This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/50021] -Wsuggest-attribute=pure makes obviously-incorrect suggestion
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 8 Aug 2011 10:13:44 +0000
- Subject: [Bug tree-optimization/50021] -Wsuggest-attribute=pure makes obviously-incorrect suggestion
- Auto-submitted: auto-generated
- References: <bug-50021-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50021
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Keywords| |diagnostic, wrong-code
Last reconfirmed| |2011.08.08 10:12:05
Component|c |tree-optimization
CC| |hubicka at gcc dot gnu.org,
| |rguenth at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-08 10:12:05 UTC ---
Confirmed. We suggest 'pure' for the head of the function which was split
by partial inlining. With -fno-partial-inlining the suggestion is gone.
Honza - we need to make sure to never suggest attributes for clones
(or heads of functions which I guess we are not representing as clone?).
The bug is really bad - and I'd rate this "diagnostic issue" as wrong-code,
as that is what we suggest.