https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68017
Bug ID: 68017 Summary: ICE on valid code at -O3 with -g enabled on x86_64-linux-gnu: cannot update SSA form 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 -O3 with -g enabled on x86_64-linux-gnu in both 32-bit and 64-bit modes. It is a regression from 5.2.x. $ 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 20151019 (experimental) [trunk revision 228969] (GCC) $ $ gcc-trunk -O3 -c small.c $ gcc-trunk -O2 -g -c small.c $ gcc-5.2 -O3 -g -c small.c $ $ gcc-trunk -O3 -g -c small.c small.c: In function ‘fn2’: small.c:10:1: error: statement uses released SSA name: fn2 () ^ # DEBUG D#4 => _5 + _24 The use of _24 should have been replaced small.c:10:1: error: statement uses released SSA name: # DEBUG D#5 => _5 + _25 The use of _25 should have been replaced small.c:10:1: internal compiler error: cannot update SSA form 0xb5fc1c update_ssa(unsigned int) ../../gcc-trunk/gcc/tree-into-ssa.c:3206 0xa0ccbf execute_function_todo ../../gcc-trunk/gcc/passes.c:1943 0xa0d5a3 execute_todo ../../gcc-trunk/gcc/passes.c:2033 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. $ ------------------------------------ long long a; short fn1 (short p1, unsigned short p2) { return p1 + p2; } short fn2 () { int b = a ? fn1 (fn2 (), a) : 0; return b; }