From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4489A3858C5E; Tue, 28 Feb 2023 11:25:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4489A3858C5E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677583502; bh=Uu6o/ji2TTqKjPI0ht6RSaQN7qAI6IsOwyUKpEylu+E=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qxedcqQQj2MgHbbiopu21qT+1HPlB/+UZUfTzMIM+bSkzcAFKxQqZlN5yA/6gg6n0 YvnJ84QSYzqC5UGUZoxDr6u7FN7W9hVJKJyVuCD8Ul3kMYAKZ3O143Wk9APxOAMO6d sQHp5ZdJ4abR1dEU44v5KXfdi0hriLm+2MaViuRQ= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/108545] [13 Regression] ICE in install_var_field, at omp-low.cc:799 since r13-2665-g23baa717c991d77f Date: Tue, 28 Feb 2023 11:24:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code, openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: burnus at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to attachments.created 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=3D108545 Tobias Burnus changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |burnus at gcc dot g= nu.org --- Comment #5 from Tobias Burnus --- Created attachment 54554 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D54554&action=3Dedit Draft patch - adds and uses tree_operand_sideeff_hash The patch does what I wrote last: Adds=20 The problem (for the Fortran testcase but probably for both) occurs for omp_mapped_by_containing_struct's omp_mapping_group **wholestruct =3D grpmap->get (wsdecl); where 'wsdecl' is 'x.a'. If I look at operand_equal_p =E2=80=93 invoked by 'tree_operand_hash::equal, I get 'true' without 'volatile' and 'false' with. The only difference is "side-effects volatile" for the component_ref and th= at "component_ref 0x7ffff6e25e70" are not identical but different tree; the arguments etc. are identical. In operand_compare::operand_equal_p there is: if (arg0 =3D=3D arg1 && ! (flags & OEP_ONLY_CONST) && (TREE_CODE (arg0) =3D=3D SAVE_EXPR || (flags & OEP_MATCH_SIDE_EFFECTS) || (! TREE_SIDE_EFFECTS (arg0) && ! TREE_SIDE_EFFECTS (arg1)))) return true; Thus, it seems as if we need a variant of=20 gcc/tree-hash-traits.h that passes not 0 but OEP_MATCH_SIDE_EFFECTS as flag to operand_equal_p.=