ipa-cp: Avoid an ICE processing self-recursive cloned edges (PR 93707)
authorMartin Jambor <mjambor@suse.cz>
Thu, 27 Feb 2020 17:43:05 +0000 (18:43 +0100)
committerMartin Jambor <mjambor@suse.cz>
Thu, 27 Feb 2020 17:44:21 +0000 (18:44 +0100)
commitcfeef9acd2cec93ed6338cc0d9fad98bdc0f7599
tree923a3a70be0ebf65978d129e41067602a5b4b858
parent9640ff5a88f25fc9bf581136fb25d1c2f756d5d4
ipa-cp: Avoid an ICE processing self-recursive cloned edges (PR 93707)

2020-02-27  Martin Jambor  <mjambor@suse.cz>
    Feng Xue  <fxue@os.amperecomputing.com>

PR ipa/93707
* ipa-cp.c (same_node_or_its_all_contexts_clone_p): Replaced with
new function calls_same_node_or_its_all_contexts_clone_p.
(cgraph_edge_brings_value_p): Use it.
(cgraph_edge_brings_value_p): Likewise.
(self_recursive_pass_through_p): Return false if caller is a clone.
(self_recursive_agg_pass_through_p): Likewise.

testsuite/
* gcc.dg/ipa/pr93707.c: New test.
gcc/ChangeLog
gcc/ipa-cp.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/ipa/pr93707.c [new file with mode: 0644]