From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 27CC1385E021; Mon, 31 Jan 2022 20:36:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 27CC1385E021 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/102414] [12 Regression] ICE in unify_array_domain, at cp/pt.c:23442 since r12-1933-ge66d0b7b87d105d2 Date: Mon, 31 Jan 2022 20:36:35 +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: 12.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.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 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, 31 Jan 2022 20:36:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102414 --- Comment #3 from CVS Commits --- The trunk branch has been updated by Marek Polacek : https://gcc.gnu.org/g:874ad5d6745bf3bbe4aa138cef09c669b3fb9b07 commit r12-6952-g874ad5d6745bf3bbe4aa138cef09c669b3fb9b07 Author: Marek Polacek Date: Thu Jan 27 18:11:03 2022 -0500 c++: ICE with auto[] and VLA [PR102414] Here we ICE in unify_array_domain when we're trying to deduce the type of an array, as in auto(*p)[i] =3D (int(*)[i])0; but unify_array_domain doesn't arbitrarily complex bounds. Another test is, e.g., auto (*b)[0/0] =3D &a; where the type of the array is <<< Unknown tree: template_type_parm >>>[0:(sizetype) ((ssizetype) (0= / 0) - 1)] It seems to me that we need not handle these. PR c++/102414 PR c++/101874 gcc/cp/ChangeLog: * decl.cc (create_array_type_for_decl): Use template_placeholde= r_p. Sorry on a variable-length array of auto. gcc/testsuite/ChangeLog: * g++.dg/cpp23/auto-array3.C: New test. * g++.dg/cpp23/auto-array4.C: New test.=