https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105654
--- Comment #6 from Max Ferger <max.ferger at gmx dot de> --- Versions of GCC that experience the bug: - x86-64 gcc 12.1 ... 14.2 `-O1` ... `-O6` Non-affected version of GCC: - x86-64 gcc 12.1 ... 14.2 `-O0 -fno-tree-dse` ... `-O6 -fno-tree-dse` - x86-64 gcc 3.4.6 ... 11.4 `-O1` ... `-O6` Findings for GCC: 1. x86-64 gcc 12.1 introduced the bug. 2. The bug is triggered by a conglomerate of the optimizations under `-O1`. 3. The bug can be circumvented via `-fno-tree-dse` (and possibly others).