This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/84562] -faggressive-loop-optimizations makes decisions based on weak data structures


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?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]