[Bug tree-optimization/82612] missing -Warray-bounds on a non-zero offset from the address of a non-array object

2019-11-05 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82612 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug tree-optimization/82612] missing -Warray-bounds on a non-zero offset from the address of a non-array object

2019-11-05 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82612 --- Comment #4 from Martin Sebor --- Author: msebor Date: Tue Nov 5 16:20:44 2019 New Revision: 277851 URL: https://gcc.gnu.org/viewcvs?rev=277851=gcc=rev Log: PR middle-end/92341 - missing -Warray-bounds indexing past the end of a compound

[Bug tree-optimization/82612] missing -Warray-bounds on a non-zero offset from the address of a non-array object

2019-11-03 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82612 Martin Sebor changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|

[Bug tree-optimization/82612] missing -Warray-bounds on a non-zero offset from the address of a non-array object

2017-10-19 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82612 --- Comment #2 from Martin Sebor --- I realize there's no ARRAY_REF but users unfamiliar with GCC internals don't, nor would they care. I'm less concerned about code that defeats the type system by using casts (though it would be nice to

[Bug tree-optimization/82612] missing -Warray-bounds on a non-zero offset from the address of a non-array object

2017-10-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82612 --- Comment #1 from Richard Biener --- But we are not even having an ARRAY_REF in the IL ... So try int g (int i) { int (*p)[2] = (int (*)[2]) return (*p)[2]; } where we also do not warn. Or the VLA variant: int g (int i, int n) {