https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83143
--- Comment #15 from John Paul Adrian Glaubitz <glaubitz at physik dot fu-berlin.de> --- (In reply to Giulio Benetti from comment #14) > This bug still shows up in gcc version 9.x and 11.x. But not on version 10.x > I've found the simple work-around to disable the optimization(override > CFLAGS with -O0) and it works. That removes too many optimizations. As explained in comment 5 [1], it should be enough to add "-freorder-blocks-algorithm=simple" instead of just removing all optimizations. > [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83143#c5