https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70998
Bug ID: 70998
Summary: [7 Regression]: ICE in pre_and_rev_post_order_compute,
at cfganal.c
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: ubizjak at gmail dot com
Target Milestone: ---
Recent commit caused following regression in the testsuite for x86_64-linux-gnu
target:
FAIL: g++.dg/pr62079.C (internal compiler error)
FAIL: g++.dg/pr62079.C (test for excess errors)
cc1plus -quiet -std=c++11 -O2 -fnon-call-exceptions pr62079.C
pr62079.C: In function ‘int main()’:
pr62079.C:78:1: internal compiler error: in pre_and_rev_post_order_compute, at
cfganal.c:1056
}
^
0x936c5d pre_and_rev_post_order_compute(int*, int*, bool)
/home/uros/gcc-svn/trunk/gcc/cfganal.c:1055
0x901f8f init_alias_analysis()
/home/uros/gcc-svn/trunk/gcc/alias.c:3252
0x13d0d5e sched_init()
/home/uros/gcc-svn/trunk/gcc/haifa-sched.c:7369
0x13d23cd haifa_sched_init()
/home/uros/gcc-svn/trunk/gcc/haifa-sched.c:7406
0xcf8d79 schedule_insns()
/home/uros/gcc-svn/trunk/gcc/sched-rgn.c:3504
0xcf959d schedule_insns()
/home/uros/gcc-svn/trunk/gcc/sched-rgn.c:3498
0xcf959d rest_of_handle_sched2
/home/uros/gcc-svn/trunk/gcc/sched-rgn.c:3737
0xcf959d execute
/home/uros/gcc-svn/trunk/gcc/sched-rgn.c:3873
Please submit a full bug report,
...
(gdb) bt
#0 internal_error (gmsgid=gmsgid@entry=0x1beef58 "in %s, at %s:%d") at
/home/uros/gcc-svn/trunk/gcc/diagnostic.c:1251
#1 0x000000000149f494 in fancy_abort (file=file@entry=0x1602c78
"/home/uros/gcc-svn/trunk/gcc/cfganal.c", line=line@entry=1056,
function=function@entry=0x1602df0 <pre_and_rev_post_order_compute(int*,
int*, bool)::__FUNCTION__> "pre_and_rev_post_order_compute") at
/home/uros/gcc-svn/trunk/gcc/diagnostic.c:1327
#2 0x0000000000936c5e in pre_and_rev_post_order_compute
(pre_order=pre_order@entry=0x0,
rev_post_order=rev_post_order@entry=0x21ed630,
include_entry_exit=include_entry_exit@entry=false)
at /home/uros/gcc-svn/trunk/gcc/cfganal.c:1055
#3 0x0000000000901f90 in init_alias_analysis () at
/home/uros/gcc-svn/trunk/gcc/alias.c:3252
#4 0x00000000013d0d5f in sched_init () at
/home/uros/gcc-svn/trunk/gcc/haifa-sched.c:7369
#5 0x00000000013d23ce in haifa_sched_init () at
/home/uros/gcc-svn/trunk/gcc/haifa-sched.c:7406
#6 0x0000000000cf8d7a in schedule_insns () at
/home/uros/gcc-svn/trunk/gcc/sched-rgn.c:3504
#7 0x0000000000cf959e in schedule_insns () at
/home/uros/gcc-svn/trunk/gcc/sched-rgn.c:3498
#8 rest_of_handle_sched2 () at /home/uros/gcc-svn/trunk/gcc/sched-rgn.c:3737
#9 (anonymous namespace)::pass_sched2::execute (this=<optimized out>) at
/home/uros/gcc-svn/trunk/gcc/sched-rgn.c:3873
#10 0x0000000000c85a04 in execute_one_pass (pass=pass@entry=0x21bb200) at
/home/uros/gcc-svn/trunk/gcc/passes.c:2344
#11 0x0000000000c85fd8 in execute_pass_list_1 (pass=0x21bb200) at
/home/uros/gcc-svn/trunk/gcc/passes.c:2428
#12 0x0000000000c85fea in execute_pass_list_1 (pass=0x21ba9c0) at
/home/uros/gcc-svn/trunk/gcc/passes.c:2429
#13 0x0000000000c85fea in execute_pass_list_1 (pass=0x21b98e0) at
/home/uros/gcc-svn/trunk/gcc/passes.c:2429
#14 0x0000000000c86035 in execute_pass_list (fn=<optimized out>,
pass=<optimized out>)
at /home/uros/gcc-svn/trunk/gcc/passes.c:2439
#15 0x000000000097c9c4 in cgraph_node::expand (this=this@entry=0x7fffeffb7730)
at /home/uros/gcc-svn/trunk/gcc/cgraphunit.c:1982
#16 0x000000000097e268 in expand_all_functions () at
/home/uros/gcc-svn/trunk/gcc/cgraphunit.c:2118
#17 symbol_table::compile (this=this@entry=0x7fffefe0c0a8) at
/home/uros/gcc-svn/trunk/gcc/cgraphunit.c:2474
#18 0x0000000000980623 in symbol_table::compile (this=0x7fffefe0c0a8) at
/home/uros/gcc-svn/trunk/gcc/cgraphunit.c:2538
#19 symbol_table::finalize_compilation_unit (this=0x7fffefe0c0a8) at
/home/uros/gcc-svn/trunk/gcc/cgraphunit.c:2564
#20 0x0000000000d4c458 in compile_file () at
/home/uros/gcc-svn/trunk/gcc/toplev.c:488
#21 0x000000000062d9a4 in do_compile () at
/home/uros/gcc-svn/trunk/gcc/toplev.c:1987
#22 toplev::main (this=this@entry=0x7fffffffdb90, argc=<optimized out>,
argc@entry=6, argv=<optimized out>,
argv@entry=0x7fffffffdc98) at /home/uros/gcc-svn/trunk/gcc/toplev.c:2095
#23 0x000000000062fb87 in main (argc=6, argv=0x7fffffffdc98) at
/home/uros/gcc-svn/trunk/gcc/main.c:39
(gdb) f 2
#2 0x0000000000936c5e in pre_and_rev_post_order_compute
(pre_order=pre_order@entry=0x0,
rev_post_order=rev_post_order@entry=0x21ed630,
include_entry_exit=include_entry_exit@entry=false)
at /home/uros/gcc-svn/trunk/gcc/cfganal.c:1055
1055 gcc_assert (pre_order_num
(gdb) list
1050 /* The number of nodes visited should be the number of blocks. */
1051 gcc_assert (pre_order_num == n_basic_blocks_for_fn (cfun));
1052 else
1053 /* The number of nodes visited should be the number of blocks minus
1054 the entry and exit blocks which are not visited here. */
1055 gcc_assert (pre_order_num
1056 == (n_basic_blocks_for_fn (cfun) - NUM_FIXED_BLOCKS));
1057
1058 return pre_order_num;
1059 }
(gdb)