[Bug ipa/100994] [12 Regression] wrong code with "-O1 -finline-small-functions -fipa-cp"
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jun 9 18:39:57 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100994
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jamborm at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The
MEM[(struct a *)&l].c = l$c_24;
in the function to be inlined is there since esra. Arguably it is strange that
esra stores back into the parameter when it is const.
In C/C++ one can cast away the const, but if the parm isn't addressable and
there are no stores to it it shouldn't be modified.
More information about the Gcc-bugs
mailing list