From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0200F385F015; Thu, 25 Aug 2022 20:40:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0200F385F015 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661460050; bh=DydwKmFC0U5jcdlLZWUdkgR/EG+GP2WBzqfFWOGahiM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QKMrbmE7BVs/GpGRnYLO7kt6G4jy0tJT2b7saO6IaDVx1VdVqVkCKGzN81cKNpOTf lME7+uhcrFcNocHFLbWXjtgR9bKuFn8UnorUqA2GallI9nPEu6uTF7z2yWutQ8Pfg7 oKUfzH/pLJ31WqHvg1iXG8mzB8gX5CLeuGZ2MFh8= From: "mikael 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:40:49 +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: mikael 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 #26 from Mikael Morin --- (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 trans-= 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 reference,= 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 hand. > > >=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.) Upon return from gfc_conv_expr, se->expr holds the value of the expression. 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.=