]> git.ipfire.org Git - thirdparty/gcc.git/commit
ipa/119973 - IPA PTA issue with global initializers
authorRichard Biener <rguenther@suse.de>
Mon, 28 Apr 2025 09:15:53 +0000 (11:15 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 5 May 2025 13:08:11 +0000 (15:08 +0200)
commitb36014e10c95d3ada1dcdf4695626af90fba0a99
tree63a25c1e5d7a7975c9ef0c37a3b75fda4e85999f
parent37c312486186ed9dc2561b2e341fd81f4f1627ec
ipa/119973 - IPA PTA issue with global initializers

For global initializers with IPA PTA we initialize them from the
IPA reference data but that lacks references to the constant pool.
The following conservatively considers the whole initializer.

PR ipa/119973
* tree-ssa-structalias.cc (create_variable_info_for):
Build constraints from DECL_INITIAL directly rather than
the IPA reference list which is incomplete.

* gcc.dg/torture/pr119973.c: New testcase.

(cherry picked from commit 7a16ef443b13fff9537baa533597836c57131262)
gcc/testsuite/gcc.dg/torture/pr119973.c [new file with mode: 0644]
gcc/tree-ssa-structalias.cc