ipa/97565 - fix IPA PTA body availability check
authorRichard Biener <rguenther@suse.de>
Mon, 23 Aug 2021 13:37:48 +0000 (15:37 +0200)
committerRichard Biener <rguenther@suse.de>
Mon, 23 Aug 2021 14:30:16 +0000 (16:30 +0200)
commit0230e69a3fabe6ad1d80cdf308ad1bf1934c4381
tree53aa9d1fdd3cfee992fced8f713f9ea227ae998f
parent39baa886bcfa95c06d30a0978aa83f33fcd49745
ipa/97565 - fix IPA PTA body availability check

Looks like the existing check using has_gimple_body_p isn't enough
at LTRANS time but I need to check in_other_partition as well.

2021-08-23  Richard Biener  <rguenther@suse.de>

PR ipa/97565
* tree-ssa-structalias.c (ipa_pta_execute): Check in_other_partition
in addition to has_gimple_body.

* g++.dg/lto/pr97565_0.C: New testcase.
* g++.dg/lto/pr97565_1.C: Likewise.
gcc/testsuite/g++.dg/lto/pr97565_0.C [new file with mode: 0644]
gcc/testsuite/g++.dg/lto/pr97565_1.C [new file with mode: 0644]
gcc/tree-ssa-structalias.c