https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64854
--- Comment #2 from Lorenz Hüdepohl <bugs at stellardeath dot org> --- (Please remove the line "use m1" from my example, its a leftover from a previous version) I'm not denying that there is a mistake in the example program. I just hoped that -fcheck=bounds would save me from this kind of mistake. Please consider this not a bug report then, but a feature request :) It really would help tremendously if this kind of misbehaviour could be checked at run-time via -fcheck-bounds.