https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81290
Bug ID: 81290 Summary: [8 Regression] ICE in update_br_prob_note Product: gcc Version: 8.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- gcc-8.0.0-alpha20170702 snapshot ICEs when compiling the following snippet w/ -O2 -funroll-loops: int vz; void ms (int sw, int cm) { for (vz = 0; vz < 19; ++vz) { fx: sw *= 2; } for (;;) { if (sw != 0) for (;;) { } if (1 / 0 && cm != 0) goto fx; } } % gcc-8.0.0-alpha20170702 -O2 -funroll-loops -c -w vev3ezql.c during RTL pass: loop2_unroll vev3ezql.c: In function 'ms': vev3ezql.c:21:1: internal compiler error: Segmentation fault } ^ (gdb) where #0 0x000000000088fc37 in update_br_prob_note(basic_block_def*) () #1 0x0000000000bc2cb9 in force_edge_cold(edge_def*, bool) () #2 0x0000000000bc2c6e in force_edge_cold(edge_def*, bool) () #3 0x0000000000bc2c6e in force_edge_cold(edge_def*, bool) () #4 0x0000000000889800 in duplicate_loop_to_header_edge(loop*, edge_def*, unsigned int, simple_bitmap_def*, edge_def*, vec<edge_def*, va_heap, vl_ptr>*, int) () #5 0x0000000000b0a747 in unroll_loops(int) () #6 0x0000000000af92a0 in (anonymous namespace)::pass_rtl_unroll_loops::execute(function*) () #7 0x0000000000bac04a in execute_one_pass(opt_pass*) () #8 0x0000000000bac8f4 in execute_pass_list_1(opt_pass*) () #9 0x0000000000bac915 in execute_pass_list_1(opt_pass*) () #10 0x0000000000bac915 in execute_pass_list_1(opt_pass*) () #11 0x0000000000bac939 in execute_pass_list(function*, opt_pass*) () #12 0x00000000008ac7c0 in cgraph_node::expand() () #13 0x00000000008adb91 in symbol_table::compile() [clone .part.54] () #14 0x00000000008afecd in symbol_table::finalize_compilation_unit() () #15 0x0000000000c87e88 in compile_file() () #16 0x000000000072f5c7 in toplev::main(int, char**) () #17 0x000000000073155b in main () Maybe related to the recent REG_BR_PROB fallout?