From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BD4CB3948D95; Tue, 20 Apr 2021 23:32:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD4CB3948D95 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/97878] [8/9 Regression] ICE in cxx_eval_outermost_constant_expr, at cp/constexpr.c:6825 Date: Tue, 20 Apr 2021 23:32:07 +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.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: P2 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 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: Tue, 20 Apr 2021 23:32:07 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97878 --- Comment #9 from CVS Commits --- The releases/gcc-9 branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:5c85df8968b00acc934396d7461a4a5ac6ddedd1 commit r9-9416-g5c85df8968b00acc934396d7461a4a5ac6ddedd1 Author: Jakub Jelinek Date: Fri Feb 5 10:22:07 2021 +0100 c++: Fix ICE with structured binding initialized to incomplete array [PR97878] We ICE on the following testcase, for incomplete array a on auto [b] { = a }; without giving any kind of diagnostics, with auto [c] =3D a; during error-recov= ery. The problem is that we get too far through check_initializer and e.g. store_init_value -> constexpr stuff can't deal with incomplete array ty= pes. As the type of the structured binding artificial variable is always deduced, I think it is easiest to diagnose this early, even if they have array t= ypes we'll need their deduced type to be complete rather than just its eleme= nt type. 2021-02-05 Jakub Jelinek PR c++/97878 * decl.c (check_array_initializer): For structured bindings, require the array type to be complete. * g++.dg/cpp1z/decomp54.C: New test. (cherry picked from commit 8b7f2d3eae16dd629ae7ae40bb76f4bb0099f441)=