From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2A7C93858D38; Wed, 25 Jan 2023 13:45:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A7C93858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674654351; bh=en7upfrRotbjOokBwh6wdsdsBThTEkX8wSpSdCePmbw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=v5HIbHC8y4/+DdKcoPpUUJk5P+Loardpozjo55vPFvS4H68Y8lspUXEOSmQNAVNFw LGhE31QvwKYRlSowTZgXQfDfB/3+rv7SVUk+l+cDQ/baXAol7sfJUNH4WozfD/5NbC z/cmny/N6lqZrelAclhVYlhk46RnnJa4zhTdSW0g= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108503] [13 Regression] ICE in get_array_or_vector_nelts, at cp/constexpr.cc:4119 Date: Wed, 25 Jan 2023 13:45:50 +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: 13.0 X-Bugzilla-Keywords: ice-on-invalid-code, openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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=3D108503 --- Comment #3 from Jakub Jelinek --- Created attachment 54341 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D54341&action=3Dedit gcc13-pr108503.patch This hack works around it, by pretending the VAR_DECLs don't have DECL_VALUE_EXPR between the deduction of the type and actually finalizing t= heir DECL_VALUE_EXPR (for !processing_template_decl only where we do the deducti= on with temporarily incremented processing_template_decl).=