From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DB2A83858D3C; Fri, 19 Nov 2021 14:05:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DB2A83858D3C 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 14:05:30 +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 14:05:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103328 --- Comment #16 from Richard Biener --- And static void verify_scope_blocks (tree block, tree supercontext) { gcc_assert (BLOCK_SUPERCONTEXT (block) =3D=3D supercontext); for (tree t =3D BLOCK_SUBBLOCKS (block); t; t =3D BLOCK_CHAIN (t)) verify_scope_blocks (t, block); } with checking inside gimplify_function_tree verify_scope_blocks (DECL_INITIAL (current_function_decl), current_function_decl); ICEs first with #1 0x00000000013ca52a in verify_scope_blocks (block=3D,=20 supercontext=3D) at /home/rguenther/src/gcc3/gcc/gimplify.c:16044 16044 gcc_assert (BLOCK_SUPERCONTEXT (block) =3D=3D supercontext); gdb) p cfun->decl $1 =3D (gdb) p block->block.supercontext->block.supercontext->block.supercontext->block.su= percontext $12 =3D possibly 'block' was added into another function, but it roots at NULL... somehow all the BLOCK setup is done in poplevel() but I can't see what's wr= ong.=