summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/opt/asm1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/opt/asm1.C')
-rw-r--r--gcc/testsuite/g++.dg/opt/asm1.C9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/opt/asm1.C b/gcc/testsuite/g++.dg/opt/asm1.C
new file mode 100644
index 000000000..333533526
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/asm1.C
@@ -0,0 +1,9 @@
+// PR c++/6747
+// { dg-do compile }
+// { dg-options "-O" }
+
+void foo()
+{
+ union { double d; char c[sizeof(double)]; } tmp;
+ __asm__ ("" : "=m" (tmp.d)); // { dg-bogus "not directly addressable" "double sized union element should be addressible" { xfail xstormy16-*-* } }
+}