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.r...@linaro.org> PR c++/80287 * g++.dg/pr80287.C: New test.
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;