https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69209
Bug ID: 69209 Summary: ICE at -Os and above on x86_64-linux-gnu (verify_gimple failed) Product: gcc Version: 6.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 -Os and above on x86_64-linux-gnu in both 32-bit and 64-bit modes. It is a regression from 5.3.x. Possibly related to PR 69083, which has just been fixed. $ 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/6.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk --enable-languages=c,c++ --disable-werror --enable-multilib Thread model: posix gcc version 6.0.0 20160108 (experimental) [trunk revision 232154] (GCC) $ $ gcc-trunk -O1 -c small.c $ gcc-5.3 -Os -c small.c $ $ gcc-trunk -Os -c small.c small.c: In function ‘fn1’: small.c:24:1: error: invalid operand in return statement } ^ f # VUSE <.MEM_1(D)> return f; small.c:24:1: internal compiler error: verify_gimple failed 0xb30566 verify_gimple_in_cfg(function*, bool) ../../gcc-trunk/gcc/tree-cfg.c:5119 0xa24257 execute_function_todo ../../gcc-trunk/gcc/passes.c:1958 0xa24b4b execute_todo ../../gcc-trunk/gcc/passes.c:2010 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. $ ------------------------------------------------------ int a, c, *d, e; void __assert_fail () __attribute__ ((__noreturn__)); int fn1 () { int f; if (a) { if (e) __assert_fail (); __assert_fail (); } d == &f ? (void) 0 : __assert_fail (); c ? (void) 0 : __assert_fail (); return f; } void fn2 () { fn1 (); }