re PR c++/80287 (C++ crash with __attribute((may_alias)))
authorYvan Roux <yvan.roux@linaro.org>
Tue, 22 Aug 2017 09:32:38 +0000 (09:32 +0000)
committerYvan Roux <yroux@gcc.gnu.org>
Tue, 22 Aug 2017 09:32:38 +0000 (09:32 +0000)
2017-08-22  Yvan Roux  <yvan.roux@linaro.org>

        PR c++/80287
        * g++.dg/pr80287.C: New test.

From-SVN: r251268

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/pr80287.C [new file with mode: 0644]

index b449d5a7f79c980af89823adef9da44fd29fe2b6..17733519e0b611608448efe80598b3d0bfc369ec 100644 (file)
@@ -1,3 +1,8 @@
+2017-08-22  Yvan Roux  <yvan.roux@linaro.org>
+
+        PR c++/80287
+        * g++.dg/pr80287.C: New test.
+
 2017-08-22  Richard Biener  <rguenther@suse.de>
 
        Revert
diff --git a/gcc/testsuite/g++.dg/pr80287.C b/gcc/testsuite/g++.dg/pr80287.C
new file mode 100644 (file)
index 0000000..da8d3fa
--- /dev/null
@@ -0,0 +1,13 @@
+// PR c++/80287
+// { dg-do compile { target c++11 } }
+// { dg-options "-g" }
+
+struct A {
+  operator long() {}
+} __attribute__((__may_alias__));
+
+struct {
+  A ino;
+} a;
+
+char b = a.ino;