]> git.ipfire.org Git - thirdparty/gcc.git/commit
strub: accept indirection of volatile pointer types [PR118007]
authorAlexandre Oliva <oliva@adacore.com>
Fri, 20 Dec 2024 21:02:01 +0000 (18:02 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Fri, 20 Dec 2024 21:02:01 +0000 (18:02 -0300)
commit09dd47bc383f30f1ba03ec80f8bd849eb6283d29
tree6a96b793b2b1fd5cfe2dc54a8ed07da44bda7c37
parente7108c34a3685eaf9edd3b1fefbd3645b9bd8def
strub: accept indirection of volatile pointer types [PR118007]

We don't want to indirect pointers in strub wrappers, because it
generally isn't profitable, but if the argument is volatile, then we
must use indirection to preserve access patterns, so amend the
assertion check.

for  gcc/ChangeLog

PR middle-end/118007
* ipa-strub.cc (pass_ipa_strub::execute): Accept indirecting
volatile args of pointer types.

for  gcc/testsuite/ChangeLog

PR middle-end/118007
* gcc.dg/strub-pr118007.c: New.
gcc/ipa-strub.cc
gcc/testsuite/gcc.dg/strub-pr118007.c [new file with mode: 0644]