https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97764
Bug ID: 97764 Summary: wrong code at -O1 and above on x86_64-pc-linux-gnu Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zhendong.su at inf dot ethz.ch Target Milestone: --- [514] % gcctk -v Using built-in specs. COLLECT_GCC=gcctk COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-trunk/configure --disable-bootstrap --prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++ --disable-werror --enable-multilib --with-system-zlib Thread model: posix Supported LTO compression algorithms: zlib gcc version 11.0.0 20201109 (experimental) [master revision 946b73c1132:a700e491347:dc7e8839c92c4bc3c3741cf27b0af81edb803fe7] (GCC) [515] % [515] % gcctk -O0 small.c; ./a.out [516] % [516] % gcctk -O1 small.c [517] % ./a.out Aborted [518] % [518] % cat small.c struct S { int b : 3; int c : 28; int d : 1; }; int main() { struct S e = {1, -1}; if (e.d) __builtin_abort(); return 0; }