https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92476
Bug ID: 92476
Summary: [10 regression] SEGV in cgraph_edge_brings_value_p
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: ro at gcc dot gnu.org
CC: marxin at gcc dot gnu.org
Target Milestone: ---
Target: i386-pc-solaris2.11, i686-pc-linux-gnu,
i586-unknown-freebsd11
Between 20191110 (r278013) and 20191111 (r278058), three tests regressed on
32-bit x86:
+FAIL: g++.dg/ipa/pr61654.C -std=gnu++14 (internal compiler error)
+FAIL: g++.dg/ipa/pr61654.C -std=gnu++14 (test for excess errors)
+FAIL: g++.dg/ipa/pr61654.C -std=gnu++17 (internal compiler error)
+FAIL: g++.dg/ipa/pr61654.C -std=gnu++17 (test for excess errors)
+FAIL: g++.dg/ipa/pr61654.C -std=gnu++2a (internal compiler error)
+FAIL: g++.dg/ipa/pr61654.C -std=gnu++2a (test for excess errors)
+FAIL: g++.dg/ipa/pr61654.C -std=gnu++98 (internal compiler error)
+FAIL: g++.dg/ipa/pr61654.C -std=gnu++98 (test for excess errors)
+FAIL: g++.dg/ipa/pr63814.C -std=gnu++14 (internal compiler error)
+FAIL: g++.dg/ipa/pr63814.C -std=gnu++14 (test for excess errors)
+UNRESOLVED: g++.dg/ipa/pr63814.C -std=gnu++14 compilation failed to produce
executable
+FAIL: g++.dg/ipa/pr63814.C -std=gnu++17 (internal compiler error)
+FAIL: g++.dg/ipa/pr63814.C -std=gnu++17 (test for excess errors)
+UNRESOLVED: g++.dg/ipa/pr63814.C -std=gnu++17 compilation failed to produce
executable
+FAIL: g++.dg/ipa/pr63814.C -std=gnu++2a (internal compiler error)
+FAIL: g++.dg/ipa/pr63814.C -std=gnu++2a (test for excess errors)
+UNRESOLVED: g++.dg/ipa/pr63814.C -std=gnu++2a compilation failed to produce
executable
+FAIL: g++.dg/ipa/pr63814.C -std=gnu++98 (internal compiler error)
+FAIL: g++.dg/ipa/pr63814.C -std=gnu++98 (test for excess errors)
+UNRESOLVED: g++.dg/ipa/pr63814.C -std=gnu++98 compilation failed to produce
executable
+FAIL: g++.dg/other/pr87916.C -std=gnu++14 (internal compiler error)
+FAIL: g++.dg/other/pr87916.C -std=gnu++14 (test for excess errors)
+FAIL: g++.dg/other/pr87916.C -std=gnu++17 (internal compiler error)
+FAIL: g++.dg/other/pr87916.C -std=gnu++17 (test for excess errors)
+FAIL: g++.dg/other/pr87916.C -std=gnu++2a (internal compiler error)
+FAIL: g++.dg/other/pr87916.C -std=gnu++2a (test for excess errors)
+FAIL: g++.dg/other/pr87916.C -std=gnu++98 (internal compiler error)
+FAIL: g++.dg/other/pr87916.C -std=gnu++98 (test for excess errors)
Excess errors:
during IPA pass: cp
/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/ipa/pr61654.C:40:1: internal
compiler error: Segmentation Fault
0x92f954c crash_signal
/vol/gcc/src/hg/trunk/local/gcc/toplev.c:329
0x9be4613 same_node_or_its_all_contexts_clone_p
/vol/gcc/src/hg/trunk/local/gcc/ipa-cp.c:3530
0x9be4613 cgraph_edge_brings_value_p
/vol/gcc/src/hg/trunk/local/gcc/ipa-cp.c:3545
0x9be032d get_info_about_necessary_edges<tree_node*>
/vol/gcc/src/hg/trunk/local/gcc/ipa-cp.c:3654
0x9be032d decide_about_value<tree_node*>
/vol/gcc/src/hg/trunk/local/gcc/ipa-cp.c:4801
0x9be29c4 decide_whether_version_node
/vol/gcc/src/hg/trunk/local/gcc/ipa-cp.c:4888
0x9be29c4 ipcp_decision_stage
/vol/gcc/src/hg/trunk/local/gcc/ipa-cp.c:5051
0x9be29c4 ipcp_driver
/vol/gcc/src/hg/trunk/local/gcc/ipa-cp.c:5228
0x9be29c4 execute
/vol/gcc/src/hg/trunk/local/gcc/ipa-cp.c:5319
Can be reproduced with
$ cc1plus -fpreprocessed pr61654.ii -quiet -O3 -o pr61654.s
Thread 2 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
cgraph_edge_brings_value_p(cgraph_edge*, ipcp_value_source<tree_node*>*,
cgraph_node*, ipcp_value<tree_node*>*) [clone .cold] ()
at /vol/gcc/src/hg/trunk/local/gcc/ipa-cp.c:3545
3545 || !same_node_or_its_all_contexts_clone_p (real_dest, dest)
(gdb) where
#0 cgraph_edge_brings_value_p(cgraph_edge*, ipcp_value_source<tree_node*>*,
cgraph_node*, ipcp_value<tree_node*>*) [clone .cold] ()
at /vol/gcc/src/hg/trunk/local/gcc/ipa-cp.c:3545
#1 0x09be032e in get_info_about_necessary_edges<tree_node*> (
caller_count=<synthetic pointer>, count_sum=<synthetic pointer>,
freq_sum=<synthetic pointer>, dest=0xfa4bb410, val=0xa4cd104)
at /vol/gcc/src/hg/trunk/local/gcc/ipa-cp.c:3652
#2 decide_about_value<tree_node*> (node=node@entry=0xfa4bb410,
index=index@entry=2, offset=<optimized out>, val=<optimized out>,
known_csts=..., known_contexts=...)
at /vol/gcc/src/hg/trunk/local/gcc/ipa-cp.c:4801
#3 0x09be29c5 in decide_whether_version_node (node=0xfa4bb410)
at /vol/gcc/src/hg/trunk/local/gcc/ipa-cp.c:4888
#4 ipcp_decision_stage (topo=<optimized out>)
at /vol/gcc/src/hg/trunk/local/gcc/ipa-cp.c:5051
#5 ipcp_driver () at /vol/gcc/src/hg/trunk/local/gcc/ipa-cp.c:5228
#6 (anonymous namespace)::pass_ipa_cp::execute (this=<optimized out>)
at /vol/gcc/src/hg/trunk/local/gcc/ipa-cp.c:5319
#7 0x0921ca72 in execute_one_pass (pass=0xa4526f0)
at /vol/gcc/src/hg/trunk/local/gcc/passes.c:2494
#8 0x0921e07d in execute_ipa_pass_list (pass=0xa4526f0)
at /vol/gcc/src/hg/trunk/local/gcc/passes.c:2921
#9 0x08e8feda in ipa_passes ()
at /vol/gcc/src/hg/trunk/local/gcc/cgraphunit.c:2541
#10 symbol_table::compile (this=this@entry=0xfa4070d0)
at /vol/gcc/src/hg/trunk/local/gcc/cgraphunit.c:2618
#11 0x08e91de5 in symbol_table::compile (this=0xfa4070d0)
at /vol/gcc/src/hg/trunk/local/gcc/cgraphunit.c:2865
#12 symbol_table::finalize_compilation_unit (this=0xfa4070d0)
at /vol/gcc/src/hg/trunk/local/gcc/cgraphunit.c:2865
#13 0x092f99a1 in compile_file ()
at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:484
#14 0x092fc101 in do_compile ()
at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:2284
#15 toplev::main (this=0xfeffd88e, argc=<optimized out>, argv=<optimized out>)
at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:2419
#16 0x09cafef1 in main (argc=7, argv=0xfeffd8f4)
at /vol/gcc/src/hg/trunk/local/gcc/main.c:39