[Bug tree-optimization/84562] -faggressive-loop-optimizations makes decisions based on weak data structures
jnordholz at sect dot tu-berlin.de
gcc-bugzilla@gcc.gnu.org
Wed Feb 28 17:49:00 GMT 2018
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?
More information about the Gcc-bugs
mailing list