From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C9325385828D; Sun, 25 Sep 2022 12:48:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C9325385828D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664110084; bh=+Iyl8uJ4/Dhegy02FMpuwToyshHW2bOORAxull0C/I0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Bqd0NfIy8ZNNkuMlHt5VKOoIRTn6DBatcBeClMjZDncj7RbwBPD77yl7pERBOyecW nlG5sof9EjpoJD+okOjownl/XKqz05ON3Buf/w/RyTGo+x8w6EkEAhM8I/ZsvGIkfi ZHc9fr9jLzWnwxqoW2bjNoVDDltaxHmrgDzPVF3c= From: "cvs-commit 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: Sun, 25 Sep 2022 12:48:01 +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: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: mikael 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 #32 from CVS Commits --- The master branch has been updated by Mikael Morin : https://gcc.gnu.org/g:edaf1e005c90b311c39b46d85cea17befbece112 commit r13-2834-gedaf1e005c90b311c39b46d85cea17befbece112 Author: Mikael Morin Date: Mon Aug 29 11:19:29 2022 +0200 fortran: Fix invalid function decl clobber ICE [PR105012] The fortran frontend, as result symbol for a function without declared result symbol, uses the function symbol itself. This caused an invalid clobber of a function decl to be emitted, leading to an ICE, whereas the intended behaviour was to clobber the function result variable. This change fixes the problem by getting the decl from the just-retrieved variable reference after the call to gfc_conv_expr_reference, instead of copying it from the frontend symbol. PR fortran/105012 gcc/fortran/ChangeLog: * trans-expr.cc (gfc_conv_procedure_call): Retrieve variable from the just calculated variable reference. gcc/testsuite/ChangeLog: * gfortran.dg/intent_out_15.f90: New test.=