From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 93BE7385E45C; Tue, 22 Mar 2022 11:18:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93BE7385E45C From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/105012] [12 Regression] wrf from SPECCPU2017 ICEs during LTO linking since r12-7692-g8db155ddf8cec9 Date: Tue, 22 Mar 2022 11:18:00 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: keywords 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, 22 Mar 2022 11:18:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105012 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code --- Comment #10 from Richard Biener --- likely triggered by the INTENT(out), it looks like gfortran fails to proper= ly name-lookup a variable of the same name as the function? The intent is lik= ely to have the return value assigned by CALERF_r8. So it also looks like gfor= tran miscompiles such testcase. The following sketches a miscompiled testcase (but my fortran fu is too wea= k to make it compile) PROCEDURE Y (Z) real(8), intent(out) :: Z Z =3D 1. END PROCEDURE Y FUNCTION X real(8) :: X CALL Y (X) END FUNCTION X PROGRAM TEST real(8) :: Z Z =3D X(); if (Z.ne.1.) STOP 1 END=