[Bug middle-end/113540] missing -Warray-bounds warning with malloc and a simple loop

2024-01-23 Thread vincent-gcc at vinc17 dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113540 --- Comment #2 from Vincent Lefèvre --- Thanks for the explanations, but why in the following case void foo (void) { volatile char t[4]; for (int i = 0; i <= 4; i++) t[i] = 0; return; } does one get the warning (contrary to the use

[Bug middle-end/113540] missing -Warray-bounds warning with malloc and a simple loop

2024-01-22 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113540 Richard Biener changed: What|Removed |Added Blocks||56456 Keywords|