ipa/94947 - fix test for externally visible variables for IPA PTA
authorRichard Biener <rguenther@suse.de>
Tue, 5 May 2020 11:09:50 +0000 (13:09 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 5 May 2020 12:41:15 +0000 (14:41 +0200)
commitf9b5db750bc7fbba69fee93564907f7da1bca35f
tree9cd4b4a830c3c81606f2de6d02ebdde1a0f052e2
parent5269b24605b17211f34dd40df2d18ba7a7f481e2
ipa/94947 - fix test for externally visible variables for IPA PTA

This fixes lack of an escape point of externally declared variables.

2020-05-05  Richard Biener  <rguenther@suse.de>

PR ipa/94947
* tree-ssa-structalias.c (ipa_pta_execute): Use
varpool_node::externally_visible_p ().
(refered_from_nonlocal_var): Likewise.

* gcc.dg/torture/pr94947-1.c: New testcase.
* gcc.dg/torture/pr94947-2.c: Likewise.
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr94947-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr94947-2.c [new file with mode: 0644]
gcc/tree-ssa-structalias.c