From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D59F8385842E; Tue, 22 Mar 2022 11:31:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D59F8385842E 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:31:12 +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: 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:31:12 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105012 --- Comment #12 from Richard Biener --- erfcx_r4 =3D {CLOBBER}; calerf_r4 ((real(kind=3D4) *) x, &__result_erfcx_r4(address-taken), &jint(address-taken)); hints at that gfortran somehow knows that it should pass the result but it still somehow clobbers the function itself!? So maybe not wrong-code but missed-optimization. The operand scanner has case FUNCTION_DECL: case LABEL_DECL: case CASE_LABEL_EXPR: /* Expressions that make no memory references. */ return; where it does not assign virtual operands to FUNCTION_DECLs. It's probably good to make DSE more forgiving here. I'm testing such workaround.=