From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E7794385781A; Tue, 16 Nov 2021 20:53:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E7794385781A From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/103246] [12 Regression] 416.gamess miscompare with -O2 -g -flto=auto since r12-5223-gecdf414bd89e6ba251f6b3f494407139b4dbae0e Date: Tue, 16 Nov 2021 20:53:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2021 20:53:45 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103246 --- Comment #10 from Martin Li=C5=A1ka --- 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 =3D 2 CALL DENDD1(X0X0,L2) IF(BSFDD) THEN=20 CALL VCLR(X01NXYZ2*L2) CALL HFD(BSFDD) END IF END $ cat cmd FLAGS=3D"-O2 -flto=3D16 -flto-partition=3D1to1 -fPIC" gfortran-11 *.f $FLAGS -c=20 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 $? =3D 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=20=20=20=20 - 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 # 2= 01c - 10f5: 00=20 - 10f6: f3 0f 11 44 24 0c movss %xmm0,0xc(%rsp) - 10fc: e8 2f ff ff ff call 1030 - 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.=