https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89012
--- Comment #4 from Zach van Rijn <me at zv dot io> --- The error can be reproduced at `O1` optimization level with both (strictly both) of the following options: ./cc -c mintest.c -O1 -freorder-blocks-algorithm=stc -ftree-pre Changing to `-freorder-blocks-algorithm=simple` will not reveal the issue at `O1`, `O2` or `O3`. In summary, the only known ways to reproduce this issue are: (0) `-O2` as described in original bug report; (1) `-O1 -freorder-blocks-algorithm=stc -ftree-pre`, exclusively not at any other optimization level; and the only known ways ot mitigate this issue using either of the above configurations are: (2) `-O2 -freorder-blocks-algorithm=simple`; (3) `-O1` without specifically both of the aforementioned flags. The attached tarball contains 5 files named by letters 'A' - 'E' containing the generated assembly, each with -dp` as suggested: (A) FAIL: `-O2 -freorder-blocks-algorithm=stc` (B) PASS: `-O2 -freorder-blocks-algorithm=simple` (C) FAIL: `-O1 -freorder-blocks-algorithm=stc -ftree-pre` (D) PASS: `-O1 -freorder-blocks-algorithm=simple -ftree-pre` (E) PASS: `-O1 -freorder-blocks-algorithm=stc`