https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95025
--- Comment #6 from David Binderman <dcb314 at hotmail dot com> --- My creduced version is similar: static a; short b; *c; d() { for (;; a--) for (; b; b++) { *c = 5; if (a) return; } } Flag -O2 on x86_64 required. The code seems to compile ok on the raspberry pi.