]> git.ipfire.org Git - thirdparty/gcc.git/commit
ipa/102714 - IPA SRA eliding volatile
authorRichard Biener <rguenther@suse.de>
Wed, 13 Oct 2021 07:13:36 +0000 (09:13 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 9 Nov 2021 12:33:32 +0000 (13:33 +0100)
commit8d016315a95cf4d9b72ee8f299e466457ca154b3
treee8c2fd0ed041a3b5c23611e8698ac1d46d0fab31
parente8311f59c6e2fa1f5aacc3da5e95739886ebdee7
ipa/102714 - IPA SRA eliding volatile

The following fixes the volatileness check of IPA SRA which was
looking at the innermost reference when checking TREE_THIS_VOLATILE
but the reference to check is the outermost one.

2021-10-13  Richard Biener  <rguenther@suse.de>

PR ipa/102714
* ipa-sra.c (ptr_parm_has_nonarg_uses): Fix volatileness
check.

* gcc.dg/ipa/pr102714.c: New testcase.

(cherry picked from commit 23cd18c60c8188e3d68eda721cdb739199e85e5b)
gcc/ipa-sra.c
gcc/testsuite/gcc.dg/ipa/pr102714.c [new file with mode: 0644]