https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96015
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ebotcazou at gcc dot gnu.org --- Comment #18 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- If the control flow goes through .L12: .L12: b .L3 ; return 0; (not interesting, fall through) ldi 1,%r28 the return value will be 1 since ldi is in the delay slot of the branch. What happens if you compile with -O2 -fno-delayed-branch instead?