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