Summary: | [11/12 Regression] Incorrect stringop-overflow warning | ||
---|---|---|---|
Product: | gcc | Reporter: | Alastair Irving <alastair.j.irving> |
Component: | tree-optimization | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | marxin, rguenth |
Priority: | P3 | Keywords: | diagnostic, needs-bisection |
Version: | 12.2.0 | ||
Target Milestone: | 11.4 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | ||
Bug Depends on: | |||
Bug Blocks: | 88443 | ||
Attachments: | Reproducer |
This has been fixed on trunk and is likely a duplicate. Dup. *** This bug has been marked as a duplicate of bug 104162 *** |
Created attachment 54071 [details] Reproducer Compiling with -O2 or higher I get an incorrect warning: test.c: In function ‘foo3’: test.c:15:5: warning: ‘foo’ accessing 16 bytes in a region of size 8 [-Wstringop-overflow=] This doesn't appear at lower optimization levels. It's also very sensative to the function, for example removing the return on the next line makes the warning go away.