From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BEEA93858280; Mon, 10 Oct 2022 20:04:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BEEA93858280 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665432298; bh=tpN0OImhcubchSl4ky+Blu4vFeUKFQjJE+wMPAInjVg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uPthQy3DBhJYeVPpqaOo1kENdV/mj6sNQB1AWNsTW6y+E6fBg3A8C7QYywJik+ksU cdgU/E6+IZlPTHte8y86C+8jQvzSbpPYur1oOWdgHzJLBVj1D/VbCZLI4KGuI8gdqa 2PiUigOhF/Mgu75swVJkKovPV0MKC3uWFzMdzc/s= 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: Mon, 10 Oct 2022 20:04:57 +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 #34 from CVS Commits --- The releases/gcc-11 branch has been updated by Mikael Morin : https://gcc.gnu.org/g:e34e5195025acd623c2383c36b99cc88ca026acf commit r11-10299-ge34e5195025acd623c2383c36b99cc88ca026acf 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.c (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)=