From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 806FB3858D3C; Fri, 19 Nov 2021 13:42:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 806FB3858D3C From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103328] [11/12 Regression] ICE in remap_gimple_stmt, at tree-inline.c:1921 since r11-7419-g0f161cc8494cf728 Date: Fri, 19 Nov 2021 13:42:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.2.1 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.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 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: Fri, 19 Nov 2021 13:42:45 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103328 --- Comment #14 from Richard Biener --- Note the BLOCK is lost somewhere between CFG build (still OK as by verify_gimple_in_cfg) and free_lang_data where it is lost. Oh, so the BLOCK in question is used in two different functions BIND_EXPRs and thus during the lowering of another function the BLOCK tree of the first function referencing the BLOCK is garbled. (gdb) p cfun->decl->decl_common.initial=20 $18 =3D (gdb) p cfun->decl->decl_common.initial->block.supercontext=20 $19 =3D (gdb) p cfun->decl->decl_common.initial->block.supercontext->block.supercon= text $20 =3D (gdb) p cfun->decl->decl_common.initial->block.supercontext->block.supercontext->bl= ock.supercontext->block.supercontext $21 =3D gcc_assert (BLOCK_SUPERCONTEXT (DECL_INITIAL (current_function_decl)) =3D=3D current_function_decl); at the start of lower_function_body will trip on this. So somewhere corout= ines functions are constructed we fail to copy the BLOCK tree of shared parts.=