https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70985
Bug ID: 70985 Summary: ICE on valid code at -O3 on x86_64-linux-gnu: verify_gimple failed Product: gcc Version: 7.0 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: --- The following code causes an ICE when compiled with the current gcc trunk at -O3 on x86_64-linux-gnu in both 32-bit and 64-bit modes. $ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto --prefix=/usr/local/gcc-trunk --disable-bootstrap Thread model: posix gcc version 7.0.0 20160506 (experimental) [trunk revision 235952] (GCC) $ $ gcc-trunk -O2 -c small.c $ $ gcc-trunk -O3 -c small.c small.c: In function ‘fn2’: small.c:15:1: error: invalid operand in unary operation fn2 () ^~~ # VUSE <.MEM_8(D)> a_f0_lsm0.8_15 = (<unnamed-signed:24>) MEM[(struct *)&a]; small.c:15:1: internal compiler error: verify_gimple failed 0xbfa87f verify_gimple_in_cfg(function*, bool) ../../gcc-source-trunk/gcc/tree-cfg.c:5166 0xae9152 execute_function_todo ../../gcc-source-trunk/gcc/passes.c:1968 0xae9b2b execute_todo ../../gcc-source-trunk/gcc/passes.c:2020 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. $ ----------------------------- struct { int f0:24; } a, c, d; int b; int fn1 () { return 0; } void fn2 () { int e; if (b) for (; e;) { d = c; if (fn1 (b)) b = a.f0; } }