From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D657C3851ABD; Thu, 25 Aug 2022 19:57:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D657C3851ABD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661457436; bh=KpXkl8I2xZdZyzkl8nx5mPOIXXqD/bY8fTrS/WHffDw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tjNAdP8rZYyXRj9VaG+2SNalfvbraN9wdDVJUr6UKTxwxd4ljpxBUACQvpPirkuGI 74fSY99mEhwxNCDVIfUa6G2CBo8tAXNQCJpuN/Jp2h6kXKsNw7AnbHhgUT1s4nqIDC FlXc6I3b4cGk9KJQ3XWIMBS9xI9Pb1V/RsWPxy50= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/105012] [12/13 Regression] wrf from SPECCPU2017 ICEs during LTO linking since r12-7692-g8db155ddf8cec9 Date: Thu, 25 Aug 2022 19:57:16 +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: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105012 --- Comment #23 from anlauf at gcc dot gnu.org --- (In reply to Mikael Morin from comment #21) > (In reply to anlauf from comment #18) > > Tentative patch, regtests cleanly but otherwise untested: > >=20 > > diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc > > index 850007fd2e1..0a1520e95ba 100644 > > --- a/gcc/fortran/trans-expr.cc > > +++ b/gcc/fortran/trans-expr.cc > > @@ -6503,8 +6503,19 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol= * > > sym, > > else > > { > > bool add_clobber; > > - add_clobber =3D fsym && fsym->attr.intent =3D=3D = INTENT_OUT > > - && !fsym->attr.allocatable && !fsym->attr.point= er > > + gfc_symbol *dsym =3D fsym; > > + gfc_dummy_arg *dummy; > > + > > + /* Use associated dummy as fallback for formal > > + argument if there is no explicit interface. */ > > (...) >=20 > Note that if there is no explicit interface, I expect associated_dummy to= be > NULL, and as a result dsym and fsym to always actually be the same thing. No, they're not, when the procedures are in the same file. At least that's what gdb tells me...=