[Bug c/98503] [11 regression] -Warray-bounds false positive with global variables at -O2 since r11-3306-g3f9a497d1b0dd9da

2021-01-05 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98503 --- Comment #10 from Martin Sebor --- The main purpose of the "partly outside" warning is to detect reads/writes that cross the trailing array boundary. Those typically come up when a "typeless" buffer (either char array or one allocated by a fu

[Bug c/98503] [11 regression] -Warray-bounds false positive with global variables at -O2 since r11-3306-g3f9a497d1b0dd9da

2021-01-05 Thread w at 1wt dot eu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98503 --- Comment #9 from Willy Tarreau --- Hi Richard, indeed, the &curr->list == &head is the test for end of list that prevents any bad access from happening. I know that usually the right way to do this is by using a list element, but sometimes i

[Bug c/98503] [11 regression] -Warray-bounds false positive with global variables at -O2 since r11-3306-g3f9a497d1b0dd9da

2021-01-05 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98503 --- Comment #8 from Richard Biener --- Note the example clearly violates C TBAA rules and the "optimization" of eliding the data member(s) for 'head' are invalid. It's not only about diagnostics but about wrong-code generation waiting to happen

[Bug c/98503] [11 regression] -Warray-bounds false positive with global variables at -O2 since r11-3306-g3f9a497d1b0dd9da

2021-01-04 Thread w at 1wt dot eu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98503 Willy Tarreau changed: What|Removed |Added Resolution|INVALID |--- Status|RESOLVED

[Bug c/98503] [11 regression] -Warray-bounds false positive with global variables at -O2 since r11-3306-g3f9a497d1b0dd9da

2021-01-04 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98503 Martin Sebor changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|---

[Bug c/98503] [11 regression] -Warray-bounds false positive with global variables at -O2 since r11-3306-g3f9a497d1b0dd9da

2021-01-04 Thread w at 1wt dot eu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98503 Willy Tarreau changed: What|Removed |Added Resolution|INVALID |--- Status|RESOLVED

[Bug c/98503] [11 regression] -Warray-bounds false positive with global variables at -O2 since r11-3306-g3f9a497d1b0dd9da

2021-01-04 Thread w at 1wt dot eu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98503 --- Comment #4 from Willy Tarreau --- Hi Martin, I'm sorry but I'm missing something, as this is how linked lists are implemented everywhere nowadays. I'm not actually casting the pointer, it was made for simplification. I'm only following the l

[Bug c/98503] [11 regression] -Warray-bounds false positive with global variables at -O2 since r11-3306-g3f9a497d1b0dd9da

2021-01-04 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98503 Martin Sebor changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug c/98503] [11 regression] -Warray-bounds false positive with global variables at -O2 since r11-3306-g3f9a497d1b0dd9da

2021-01-04 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98503 Martin Liška changed: What|Removed |Added Known to fail||11.0 Summary|[11 regression]