PR c++/80287 add new testcase

Message ID CAD57uCcF3hZSNoKGHyYHS6=qOZ-Njvxc6fJRYu3oqCU9B4mchg@mail.gmail.com
State New
Headers show

Commit Message

Yvan Roux July 13, 2017, 12:02 p.m.
Hi,

as discussed in the PR, this patch adds a new reduced testcase which
doesn't rely on c++17 features, this is a prereq to the backport of
the fix into GCC 6 branch which is impacted by this issue.

Validated on x86, ARM and AArch64 targets.

Ok for trunk ? and maybe on gcc-7-branch ?

Thanks,
Yvan

gcc/testsuite
2017-07-13  Yvan Roux  <yvan.roux@linaro.org>

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

Patch hide | download patch | download mbox

diff --git a/gcc/testsuite/g++.dg/pr80287.C b/gcc/testsuite/g++.dg/pr80287.C
new file mode 100644
index 00000000000..da8d3fab150
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr80287.C
@@ -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;