[Bug c/108439] New: incorrect optimization with -O2, -O3, -Os

2023-01-17 Thread georgmueller at gmx dot net via Gcc-bugs
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

[Bug c/108439] incorrect optimization with -O2, -O3, -Os

2023-01-17 Thread georgmueller at gmx dot net via Gcc-bugs
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

[Bug c/108439] incorrect optimization with -O2, -O3, -Os

2023-01-17 Thread georgmueller at gmx dot net via Gcc-bugs
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.

[Bug c/108439] incorrect optimization with -O2, -O3, -Os

2023-01-17 Thread georgmueller at gmx dot net via Gcc-bugs
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,

[Bug c/108439] incorrect optimization with -O2, -O3, -Os

2023-01-18 Thread georgmueller at gmx dot net via Gcc-bugs
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?

[Bug tree-optimization/103173] strncpy output may be truncated copying 32 bytes from a string of length 1439 (bogus) [-Werror=stringop-truncation]

2023-07-20 Thread georgmueller at gmx dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103173 Georg Müller changed: What|Removed |Added CC||georgmueller at gmx dot net --- Comment