https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103246
--- Comment #10 from Martin Liška <marxin at gcc dot gnu.org> --- I isolated small reproducer: $ cat 1.f SUBROUTINE DENDD1(B,L2) IF(CITYPIPSI.EQ.1) CALL VADD(A1DB1DA,1,L2) END $ cat 2.f LOGICAL BSFDD L2 = 2 CALL DENDD1(X0X0,L2) IF(BSFDD) THEN CALL VCLR(X01NXYZ2*L2) CALL HFD(BSFDD) END IF END $ cat cmd FLAGS="-O2 -flto=16 -flto-partition=1to1 -fPIC" gfortran-11 *.f $FLAGS -c gfortran-11 *.o $FLAGS -o gamess1 -shared $OBJ gfortran-11 *.o $FLAGS -fdump-ipa-inline -o gamess2 -shared $OBJ objdump -d gamess1 > gamess1.txt objdump -d gamess2 > gamess2.txt diff -u gamess1 gamess2 if test $? = 1; then exit 0 else exit 1 fi $ ./cmd && diff gamess1.txt gamess2.txt ... @@ -76,91 +76,88 @@ 10d8: 31 c0 xor %eax,%eax 10da: 48 83 c4 18 add $0x18,%rsp 10de: c3 ret - 10df: 66 0f ef c0 pxor %xmm0,%xmm0 - 10e3: 48 8d 7c 24 0c lea 0xc(%rsp),%rdi - 10e8: f3 0f 2a 44 24 04 cvtsi2ssl 0x4(%rsp),%xmm0 - 10ee: f3 0f 59 05 26 0f 00 mulss 0xf26(%rip),%xmm0 # 201c <options.0.0+0x1c> - 10f5: 00 - 10f6: f3 0f 11 44 24 0c movss %xmm0,0xc(%rsp) - 10fc: e8 2f ff ff ff call 1030 <vclr_@plt> - 1101: 48 89 e7 mov %rsp,%rdi ... but this got fixed on master with r12-5223-gecdf414bd89e6ba2. I'll try if it happens with the current master. Hope it helps.