[Bug target/96015] [10/11 Regression] gcc-10.1.0 miscompiles Python on hppa

slyfox at inbox dot ru gcc-bugzilla@gcc.gnu.org
Thu Jul 2 17:16:57 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96015

--- Comment #21 from Sergei Trofimovich <slyfox at inbox dot ru> ---
(In reply to Eric Botcazou from comment #18)
> 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?

Oh, -fno-delayed-branch makes test magically pass! Attaching both bad.S and
good.S for comparison.


More information about the Gcc-bugs mailing list