diff options
Diffstat (limited to 'clang/test/Sema/heinous-extensions-off.c')
-rw-r--r-- | clang/test/Sema/heinous-extensions-off.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Sema/heinous-extensions-off.c b/clang/test/Sema/heinous-extensions-off.c new file mode 100644 index 0000000..9b80d34 --- /dev/null +++ b/clang/test/Sema/heinous-extensions-off.c @@ -0,0 +1,10 @@ +// RUN: %clang_cc1 %s -verify + +int foo() { + int a; + // PR3788 + asm("nop" : : "m"((int)(a))); // expected-error {{cast in a inline asm context requiring an l-value}} + // PR3794 + asm("nop" : "=r"((unsigned)a)); // expected-error {{cast in a inline asm context requiring an l-value}} +} + |