This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/84562] -faggressive-loop-optimizations makes decisions based on weak data structures
- From: "jnordholz at sect dot tu-berlin.de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 28 Feb 2018 17:44:43 +0000
- Subject: [Bug tree-optimization/84562] -faggressive-loop-optimizations makes decisions based on weak data structures
- Auto-submitted: auto-generated
- References: <bug-84562-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84562
--- Comment #7 from Jan Nordholz <jnordholz at sect dot tu-berlin.de> ---
(In reply to Richard Biener from comment #5)
> Btw, the behavior is the way you describe since forever. That GCC looks at
> the constant initializer for the array is just a direct consequence of it
> looking at the constant initializer of the scalar.
And my point is that the compiler shouldn't look at the initializer of weak
objects in the first place. :) How long this behaviour already exists or what
the competition is doing doesn't really change my feeling that this is the
Wrong Thing To Do. But it's your bugtracker, I won't argue if you insist that
this should be flagged as invalid.
If I (or somebody else who happens to find this bug report) would come up with
a patch to fix this inconsistency (as Alexander has showcased even more
concisely in comment #3), would this be considered by the project?