fix PR3258 by rejecting invalid numeric operands.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66618 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/asm.c b/test/Sema/asm.c
index 32f32c6..6ed9c50 100644
--- a/test/Sema/asm.c
+++ b/test/Sema/asm.c
@@ -55,7 +55,7 @@
   asm("nop" : : "er"(i));
 }
 
-void asm_string_tests() {
+void asm_string_tests(int i) {
   asm("%!");   // simple asm string, %! is not an error.   
   asm("%!" : );   // expected-error {{invalid % escape in inline assembly string}}
   asm("xyz %" : );   // expected-error {{invalid % escape in inline assembly string}}
@@ -64,4 +64,8 @@
   asm ("%[somename]" :: "i"(4)); // expected-error {{unknown symbolic operand name in inline assembly string}}
   asm ("%[somename" :: "i"(4)); // expected-error {{unterminated symbolic operand name in inline assembly string}}
   asm ("%[]" :: "i"(4)); // expected-error {{empty symbolic operand name in inline assembly string}}
+  
+  // PR3258
+  asm("%9" :: "i"(4)); // expected-error {{invalid operand number in inline asm string}}
+  asm("%1" : "+r"(i)); // ok, referring to input.
 }