From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 18210385F015; Thu, 25 Aug 2022 20:47:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 18210385F015 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661460459; bh=QGdAcBvQpxqHOV1ODnwzDz2FyW5vnwKp+xIjCNfO094=; h=From:To:Subject:Date:In-Reply-To:References:From; b=o0jfTSqfmb/UY5XJKbXdWAOk15QiY7k5bdq9ktVaGZXZScILjltCqiIoKTtWAvbMG ng+JLu7+6XIqDRsVlOiBIRTCUVOBupT61T/ZPa+BK410+KhU8jL9VBOGCYmlfKCp7N +Cn53V+iTKRsUFp/sweqva055LkqUGp1ACJml/r0= 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 20:47:38 +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 #27 from anlauf at gcc dot gnu.org --- (In reply to Mikael Morin from comment #26) > (In reply to anlauf from comment #25) > > (In reply to Mikael Morin from comment #24) > > > (In reply to anlauf from comment #22) > > > >=20 > > > > The remaining problem from PR41453#c8 is the following code in tran= s-expr.cc: > > > >=20 > > > > (gdb) l 9539,9548 > > > > 9539 else if (add_clobber && expr->ref =3D=3D NULL) > > > > 9540 { > > > > 9541 tree clobber; > > > > 9542 tree var; > > > > 9543 /* FIXME: This fails if var is passed by referenc= e, see PR > > > > 9544 41453. */ > > > > 9545 var =3D expr->symtree->n.sym->backend_decl; > > > > 9546 clobber =3D build_clobber (TREE_TYPE (var)); > > > > 9547 gfc_add_modify (&se->pre, var, clobber); > > > > 9548 } > > > >=20 > > > > One needs to understand how to fix up 'var' here for the case at ha= nd. > > > >=20 > > > I guess the obvious one (se->expr) doesn=E2=80=99t work? > >=20 > > Could you explain how to use it? (I don't have the necessary vision.) >=20 > Upon return from gfc_conv_expr, se->expr holds the value of the expressio= n. > So basically var =3D se->expr; > As we manage to pass __result_derfc as argument, then I expect se->expr to > have value __result_derfc at that point. I tried that - just rechecked - and get an ICE: gimplification failed. So there's some magic missing I don't see...=