From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3100B3858C78; Wed, 10 Apr 2024 12:40:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3100B3858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712752818; bh=825cBs4WU+TrKlpcepQYtYfFy8zVFFYjGmzSPzzVlew=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uJ4swsSo2h9p2gDv0ZfuX/WL6LGhe1TSVnXTokmvHT4nFjOWr/LtR/i510CCBhcZi N0ojpv0CTfIbT8/YJZGKAFwNOvo6mvYfuHvbnDBFwHlbcksx+XiJ7/9DGB6bYs8TYK pp/oD/xYUIgYms2fN4Ur212Mk8M3NTJglxzPPwdw= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114409] [14 Regression] ICE after adding novector pragmas (internal compiler error: in tsubst_expr, at cp/pt.cc:21794) since r14-4229-g9c62af101e11e1cce573c2b3d2e18b403412dbc8 Date: Wed, 10 Apr 2024 12:40:15 +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: 14.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 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=3D114409 --- Comment #14 from Jakub Jelinek --- I had another look at this. The reason why this works without the pragmas (i.e. without ANNOTATE_EXPRs)= is that the WHILE_COND/FOR_COND are handled not by tsubst_expr but tsubst_stmt: case FOR_STMT: stmt =3D begin_for_stmt (NULL_TREE, NULL_TREE); RECUR (FOR_INIT_STMT (t)); finish_init_stmt (stmt); tmp =3D RECUR (FOR_COND (t)); finish_for_cond (tmp, stmt, false, 0, false); and case WHILE_STMT: stmt =3D begin_while_stmt (); tmp =3D RECUR (WHILE_COND (t)); finish_while_stmt_cond (tmp, stmt, false, 0, false); in tsubst_stmt, where RECUR in that case means tsubst_stmt, not tsubst_expr. So, one possible fix is to use tsubst_stmt rather than RECUR aka tsubst_expr on the first operand of ANNOTATE_EXPR. And another would be to move the ANNOTATE_EXPR handling from tsubst_expr to tsubst_stmt.=