https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77362
Bug ID: 77362 Summary: [7 Regression] [graphite] ICE in sese_build_liveouts_use w/ -O2 -floop-nest-optimize Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- gcc-7.0.0-alpha20160821 and some earlier snapshots (at least back to 7.0.0-alpha20160731) ICE when compiling the following snippet w/ -O2 (-O3, -Ofast) -floop-nest-optimize: int mc[2]; int f2, sk; short int hm; void zm (void) { int k1; for (k1 = 0; k1 < 2; ++k1) { for (sk = 0; sk < 2; ++sk) mc[sk] = hm = ++f2; if (hm >= 0) ++hm; } } % gcc-7.0.0-alpha20160821 -O2 -floop-nest-optimize -c rzmadogh.c rzmadogh.c: In function 'zm': rzmadogh.c:6:1: internal compiler error: Segmentation fault Backtrace is seemingly different for different targets, nevertheless sese_build_liveouts_use is always on top. For x86_64 I have: #0 0x00000000012ff0b1 in sese_build_liveouts_use(sese_info_t*, bitmap_head*, basic_block_def*, tree_node*) () #1 0x00000000012ff87c in sese_insert_phis_for_liveouts(sese_info_t*, basic_block_def*, edge_def*, edge_def*) () #2 0x000000000126859a in graphite_regenerate_ast_isl(scop*) () #3 0x000000000125edac in graphite_transform_loops() () #4 0x000000000125f2c1 in (anonymous namespace)::pass_graphite_transforms::execute(function*) () #5 0x0000000000a8e236 in execute_one_pass(opt_pass*) () #6 0x0000000000a8e848 in execute_pass_list_1(opt_pass*) () #7 0x0000000000a8e85a in execute_pass_list_1(opt_pass*) () #8 0x0000000000a8e85a in execute_pass_list_1(opt_pass*) () #9 0x0000000000a8e85a in execute_pass_list_1(opt_pass*) () #10 0x0000000000a8e8a5 in execute_pass_list(function*, opt_pass*) () #11 0x000000000076e004 in cgraph_node::expand() () #12 0x000000000076f9a7 in symbol_table::compile() [clone .part.47] () #13 0x0000000000771c78 in symbol_table::finalize_compilation_unit() () #14 0x0000000000b5fd9d in compile_file() () #15 0x00000000005ced77 in toplev::main(int, char**) () #16 0x00000000005d10a7 in main ()