https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108754
--- Comment #2 from Hans-Peter Nilsson <hp at gcc dot gnu.org> --- Diff of .s for mzero3 at -O2: --- /x/0/gccobj/gcc/testsuite/gcc/mzero3.x2-mzero3.s 2023-02-10 17:57:56.786279467 +0100 +++ /x/1/gccobj/gcc/testsuite/gcc/mzero3.x2-mzero3.s 2023-02-10 17:57:06.083925076 +0100 @@ -94,10 +94,8 @@ _main: move.d $r8,$r12 move.d $r7,$r13 jsr $r4 - move.d [_zerof],$r9 - move.d $r9,[$sp+36] move.d _negf,$r2 - move.d $r9,$r10 + move.d [$sp+36],$r10 Jsr $r2 move.d [_nzerof],$r3 move.d _expectf,$r0 That's the setup to call negf (zerof), and the diff is that zerof is saved to stack before the patch, but with the patch, the uninitialized contents of that slot is used.