https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81090
Bug ID: 81090 Summary: [8 Regression] [graphite] ICE in loop_preheader_edge Product: gcc Version: 8.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-8.0.0-alpha20170611 snapshot ICEs when compiling the following snippet w/ -O2 (-O3, -Ofast) -floop-nest-optimize: int x3, za; int hg[1]; void yw (int dq) { const int r7 = 2; while (dq < 1) { for (x3 = 0; x3 < r7; ++x3) for (za = 0; za < r7; ++za) hg[1] = 0; ++dq; } x3 = 0; while (x3 < r7) { ++x3; if (x3 == 0) break; } } % gcc-8.0.0-alpha20170611 -O2 -floop-nest-optimize -c yrfe1sre.c during GIMPLE pass: graphite yrfe1sre.c: In function 'yw': yrfe1sre.c:5:1: internal compiler error: Segmentation fault yw (int dq) ^~ (gdb) where #0 0x000000000087c4e8 in loop_preheader_edge(loop const*) () #1 0x0000000000d44621 in analyze_scalar_evolution(loop*, tree_node*) () #2 0x0000000000d47d7b in analyze_scalar_evolution_in_loop(loop*, loop*, tree_node*, bool*) () #3 0x0000000000d47ed2 in simple_iv_with_niters(loop*, loop*, tree_node*, affine_iv*, tree_node**, bool) () #4 0x0000000000bad67f in is_comparison_with_loop_invariant_p(gcond*, loop*, tree_node**, tree_code*, tree_node**, tree_node**) () #5 0x0000000000bb4139 in predict_loops() () #6 0x0000000000bb6023 in tree_estimate_probability(bool) () #7 0x0000000001375172 in graphite_transform_loops() () #8 0x0000000001375701 in (anonymous namespace)::pass_graphite_transforms::execute(function*) () #9 0x0000000000b9b629 in execute_one_pass(opt_pass*) () #10 0x0000000000b9be55 in execute_pass_list_1(opt_pass*) () #11 0x0000000000b9be67 in execute_pass_list_1(opt_pass*) () #12 0x0000000000b9be67 in execute_pass_list_1(opt_pass*) () #13 0x0000000000b9be67 in execute_pass_list_1(opt_pass*) () #14 0x0000000000b9be99 in execute_pass_list(function*, opt_pass*) () #15 0x00000000008a4720 in cgraph_node::expand() () #16 0x00000000008a5bd1 in symbol_table::compile() [clone .part.51] () #17 0x00000000008a7dc7 in symbol_table::finalize_compilation_unit() () #18 0x0000000000c71655 in compile_file() () #19 0x000000000072f69a in toplev::main(int, char**) () #20 0x00000000007315bb in main ()