aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/asm.c
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-01-18 01:56:57 +0000
committerAnders Carlsson <andersca@mac.com>2009-01-18 01:56:57 +0000
commit42e1ee0702d8267d632df0fdb5c479a582877c6f (patch)
treec03571441cb1bdec76f6cfcc86cfa84285ceffd0 /test/Sema/asm.c
parent353417af9d254d4fd0eb7d0a3ff71c4d8594ac58 (diff)
Add sema support for symbolic names in inline asm statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62441 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/asm.c')
-rw-r--r--test/Sema/asm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/Sema/asm.c b/test/Sema/asm.c
index d29335a924..3bb7d78f5b 100644
--- a/test/Sema/asm.c
+++ b/test/Sema/asm.c
@@ -10,7 +10,11 @@ f()
asm ("foo\n" : "=a" (f())); // expected-error {{invalid lvalue in asm output}}
asm ("foo\n" : "=a" (i + 2)); // expected-error {{invalid lvalue in asm output}}
-
+
+ asm ("foo\n" : [symbolic_name] "=a" (i) : "[symbolic_name]" (i));
+ asm ("foo\n" : "=a" (i) : "[" (i)); // expected-error {{invalid input constraint '[' in asm}}
+ asm ("foo\n" : "=a" (i) : "[foo" (i)); // expected-error {{invalid input constraint '[foo' in asm}}
+ asm ("foo\n" : "=a" (i) : "[symbolic_name]" (i)); // expected-error {{invalid input constraint '[symbolic_name]' in asm}}
}
void