From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D6DF63858C2C; Mon, 3 Jan 2022 11:55:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6DF63858C2C From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/103851] ICE in gimple_range_global with -ftrivial-auto-var-init=pattern since r12-3433-ga25e0b5e6ac8a77a Date: Mon, 03 Jan 2022 11:55:32 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: ice-on-valid-code, openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc bug_status assigned_to 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jan 2022 11:55:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103851 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amacleod at redhat dot com Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot = gnu.org --- Comment #3 from Richard Biener --- Indeed what gimple_ranger::export_global_ranges does is a bit iffy but we shouldn't have SSA names not in the free list with a NULL def stmts. The SSA name in question is allocated here: #2 0x000000000135e968 in clear_padding_type (buf=3D0x7fffffffaeb0,=20 type=3D, sz=3D96, for_auto_init=3Dtrue) at /home/rguenther/src/gcc3/gcc/gimple-fold.c:4774 4774 tree end =3D make_ssa_name (TREE_TYPE (buf->base)); it's defining stmt is cleared via move_sese_region_to_fn doing in replace_ssa_name /* Now that we've used the def stmt to define new_name, make sure it doesn't define name anymore. */ SSA_NAME_DEF_STMT (name) =3D NULL; but we expect those SSA names to be released later but that only happens wh= en gimple_in_ssa_p: if (gimple_in_ssa_p (cfun)) {=20 /* We need to release ssa-names in a defined order, so first find the= m, and then iterate in ascending version order. */ bitmap release_names =3D BITMAP_ALLOC (NULL); vars_map.traverse (release_nam= es); bitmap_iterator bi; unsigned i; EXECUTE_IF_SET_IN_BITMAP (release_names, 0, i, bi) release_ssa_name (ssa_name (i));=