https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67827
Bug ID: 67827 Summary: ICE on valid code at -O2 and -O3 on x86_64-linux-gnu in duplicate_ssa_name_range_info, at tree-ssanames.c:506 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 -O2 and -O3 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 20151002 (experimental) [trunk revision 228389] (GCC) $ $ gcc-trunk -Os -c small.c $ gcc-5.2 -O2 -c small.c $ $ gcc-trunk -O2 -c small.c small.c: In function ‘fn1’: small.c:5:1: internal compiler error: in duplicate_ssa_name_range_info, at tree-ssanames.c:506 fn1 () ^ 0xcb0f15 duplicate_ssa_name_range_info(tree_node*, value_range_type, range_info_def*) ../../gcc-trunk/gcc/tree-ssanames.c:506 0xc37f3d eliminate_dom_walker::before_dom_children(basic_block_def*) ../../gcc-trunk/gcc/tree-ssa-pre.c:4127 0x10e9c5e dom_walker::walk(basic_block_def*) ../../gcc-trunk/gcc/domwalk.c:177 0xc3689b eliminate ../../gcc-trunk/gcc/tree-ssa-pre.c:4540 0xc3ffd7 execute ../../gcc-trunk/gcc/tree-ssa-pre.c:4890 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, b, c, d, e, g; short f; void fn1 () { int i; f = a - b; e = (c && (i = d = (unsigned) f - 1)) || i; g = (unsigned) f - 1; c && (d = 0); }