diff options
author | Richard Biener <rguenther@suse.de> | 2022-12-07 10:26:01 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2022-12-07 11:28:00 +0100 |
commit | 45e09c2eb9c2bdd34ef777e06ddc9908dd0664f9 (patch) | |
tree | a6b559ea9c8b4decd2d5c1efbac5b7be49a3ac01 /libcpp/macro.cc | |
parent | 3a1a141f79c83ad38f7db3a21d8a4dcfe625c176 (diff) | |
download | gcc-45e09c2eb9c2bdd34ef777e06ddc9908dd0664f9.zip gcc-45e09c2eb9c2bdd34ef777e06ddc9908dd0664f9.tar.gz gcc-45e09c2eb9c2bdd34ef777e06ddc9908dd0664f9.tar.bz2 |
ipa/105676 - pure attribute suggestion for const function
When a function is declared const (even though it technically
accesses memory), ipa-modref discovering pureness shouldn't end
up suggesting that attribute. The following thus exempts
'const' functions from ipa_make_function_pure handling.
PR ipa/105676
* ipa-pure-const.cc (ipa_make_function_pure): Skip also
for functions already being const.
* gcc.dg/pr105676.c: New testcase.
Diffstat (limited to 'libcpp/macro.cc')
0 files changed, 0 insertions, 0 deletions