summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/asm.c
diff options
context:
space:
mode:
authorAbramo Bagnara <abramo.bagnara@gmail.com>2011-01-11 15:16:52 +0000
committerAbramo Bagnara <abramo.bagnara@gmail.com>2011-01-11 15:16:52 +0000
commit133922318641d2545df6c45d06b4f4cefc3670fc (patch)
treead14ec2b14bbeaa813cbba0f858fd85dfa5f5c1a /clang/test/Sema/asm.c
parentc8adf5f4584677007900043e86d012846f485de9 (diff)
downloadbcm5719-llvm-133922318641d2545df6c45d06b4f4cefc3670fc.tar.gz
bcm5719-llvm-133922318641d2545df6c45d06b4f4cefc3670fc.zip
Added warning about invalid register specification for local variables.
llvm-svn: 123236
Diffstat (limited to 'clang/test/Sema/asm.c')
-rw-r--r--clang/test/Sema/asm.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/clang/test/Sema/asm.c b/clang/test/Sema/asm.c
index af6754a68b4..7f0f396b9d8 100644
--- a/clang/test/Sema/asm.c
+++ b/clang/test/Sema/asm.c
@@ -92,6 +92,16 @@ void test9(int i) {
asm("" : [foo] "=r" (i), "=r"(i) : "[foo]1"(i)); // expected-error{{invalid input constraint '[foo]1' in asm}}
}
+register int g asm("dx"); // expected-error{{global register variables are not supported}}
+
void test10(void){
- register unsigned long long bar asm("foo"); // expected-error {{unknown register name 'foo' in asm}}
+ static int g asm ("g_asm") = 0;
+ extern int gg asm ("gg_asm");
+ __private_extern__ int ggg asm ("ggg_asm");
+
+ int a asm ("a_asm"); // expected-warning{{ignored asm label 'a_asm' on automatic variable}}
+ auto int aa asm ("aa_asm"); // expected-warning{{ignored asm label 'aa_asm' on automatic variable}}
+
+ register int r asm ("cx");
+ register int rr asm ("rr_asm"); // expected-error{{unknown register name 'rr_asm' in asm}}
}
OpenPOWER on IntegriCloud