Skip to content
Snippets Groups Projects
Commit 45e09c2e authored by Richard Biener's avatar Richard Biener
Browse files

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.
parent 3a1a141f
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment