https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64494
Bug ID: 64494 Summary: ICE at -Os and above on x86_64-linux-gnu in duplicate_ssa_name_range_info, at tree-ssanames.c:499 Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: su at cs dot ucdavis.edu 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 4.9.x. $ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/lto-wrapper Target: x86_64-unknown-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 5.0.0 20150104 (experimental) [trunk revision 219172] (GCC) $ $ gcc-trunk -O1 small.c; a.out $ gcc-4.9 -Os small.c; a.out $ $ gcc-trunk -Os small.c small.c: In function ‘main’: small.c:5:1: internal compiler error: in duplicate_ssa_name_range_info, at tree-ssanames.c:499 main () ^ 0xc90af5 duplicate_ssa_name_range_info(tree_node*, value_range_type, range_info_def*) ../../gcc-trunk/gcc/tree-ssanames.c:499 0xba9f24 fini_copy_prop ../../gcc-trunk/gcc/tree-ssa-copy.c:572 0xba9f24 execute_copy_prop ../../gcc-trunk/gcc/tree-ssa-copy.c:628 0xba9f24 execute ../../gcc-trunk/gcc/tree-ssa-copy.c:658 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; char c; int main () { int d = 0; a = 0; for (; d < 2; d++) { a &= (b >= 1); c = (204 > (255 >> a)) ? 0 : 204 << a; b = 0; } return 0; }