From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 501D73851155; Wed, 12 Oct 2022 12:34:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 501D73851155 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665578050; bh=HUsUu3Ou2GSnS/zCSsCy7tNATogVmy40z6oKtiQOVIw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=W+9zRX+Vuax7mGtC7m6SUqZDaQT+LJQCzjHSoSjwk+0OzkAwqd1LhfY/qX2Y4huwN s1Dg/RjecQigTd3dzWeQAztaUhE6WpfWL3GLRZBEpgqw/EBxjJFcF+Hv20xTHpAKNT XhoZ2jMeHG1ccCtnOVeCxQKxGBv7yLh/gjYt9+FM= 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: Wed, 12 Oct 2022 12:34:08 +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 #36 from CVS Commits --- The releases/gcc-12 branch has been updated by Mikael Morin : https://gcc.gnu.org/g:5d645a9dbda0174a25358bf5090640acedec1159 commit r12-8825-g5d645a9dbda0174a25358bf5090640acedec1159 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. (cherry picked from commit edaf1e005c90b311c39b46d85cea17befbece112)=