https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108439
Bug ID: 108439
Summary: incorrect optimization with -O2, -O3, -Os
Product: gcc
Version: 12.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108439
--- Comment #1 from Georg Müller ---
Created attachment 54293
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54293&action=edit
reduced test case to give a compile warning, which seems to be incorrect
While trying to reduce the problem and
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108439
--- Comment #2 from Georg Müller ---
Just a small additional note: The dependency on argc in the loop filling the
array in main() is only there to avoid early optimization.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108439
--- Comment #5 from Georg Müller ---
(In reply to Andrew Pinski from comment #4)
> (In reply to Georg Müller from comment #1)
> > Also, this compiler warning and execution error is removed by compiling with
> > -fno-strict-aliasing, but again,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108439
--- Comment #7 from Georg Müller ---
Ok, but then why isn't there a single warning - even with -Wstrict-aliasing=1
and a completely misleading error message for the second, reduced test?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103173
Georg Müller changed:
What|Removed |Added
CC||georgmueller at gmx dot net
--- Comment