[Bug c/106920] -Warray-bound false positive regression with -O2 or -Os and constant address

2022-09-14 Thread npfhrotynz-ptnqh.myvf at noclue dot notk.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106920 --- Comment #5 from Dominique Martinet --- hmm this is a pretty complex topic. My problem like pointed out in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578 is more with all the legacy code that I have to deal with, that isn't maintained by

[Bug c/106920] -Warray-bound false positive regression with -O2 or -Os and constant address

2022-09-14 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106920 --- Comment #4 from Richard Biener --- might be nice to have a way to declare a variable at a fixed address so the code can become extern hab_rvt_entry_p **entryptr __attribute__((at(0x908))); int main() { hab_rvt_entry_t *a = *entrypt

[Bug c/106920] -Warray-bound false positive regression with -O2 or -Os and constant address

2022-09-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106920 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE Status|NEW

[Bug c/106920] -Warray-bound false positive regression with -O2 or -Os and constant address

2022-09-13 Thread npfhrotynz-ptnqh.myvf at noclue dot notk.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106920 --- Comment #2 from Dominique Martinet --- Thanks for the very fast reply! since you mentioned null pointers I now see this warning doesn't happen if I try with a larger constant, I just had bad luck that imx-atf uses an address < 4k...? I ch

[Bug c/106920] -Warray-bound false positive regression with -O2 or -Os

2022-09-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106920 Richard Biener changed: What|Removed |Added Keywords||diagnostic Status|UNCONFIR