https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88621
Bug ID: 88621 Summary: wrong code at -O1 and above on x86_64-linux-gnu in 64-bit mode (not in 32-bit mode) Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: su at cs dot ucdavis.edu Target Milestone: --- This seems to be a recent regression. $ gcctk -v Using built-in specs. COLLECT_GCC=gcctk COLLECT_LTO_WRAPPER=/home/su/software/tmp/gcc/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto --prefix=/home/su/software/tmp/gcc/gcc-trunk --disable-bootstrap Thread model: posix gcc version 9.0.0 20181226 (experimental) [trunk revision 267421] (GCC) $ $ gcctk -O0 small.c; ./a.out $ $ gcctk -O1 small.c $ timeout -s 9 5 ./a.out Killed $ ------------------------------- struct S { int b:4; int c; } e = { -1, 0 }; int d, f; int main () { while (f) { struct S g = { 0, 0 }; e = g; } L: while (e.b > 0) ; e.b = 0; if (d) goto L; return 0; }