From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CAF2839AC86C; Wed, 3 Feb 2021 14:41:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CAF2839AC86C From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/97878] [8/9/10/11 Regression] ICE in cxx_eval_outermost_constant_expr, at cp/constexpr.c:6825 Date: Wed, 03 Feb 2021 14:41:40 +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: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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: Wed, 03 Feb 2021 14:41:40 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97878 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek --- With extern int a[]; auto [b] =3D a; it is just error-recovery bug rather than ice-on-invalid-code: pr97878-3.C:2:12: error: initializer fails to determine size of =E2=80=98=E2=80=99 2 | auto [b] =3D a; | ^ pr97878-3.C:2:12: internal compiler error: in cxx_eval_outermost_constant_e= xpr, at cp/constexpr.c:7127 0xaa8260 cxx_eval_outermost_constant_expr ../../gcc/cp/constexpr.c:7127 0xaa9a81 maybe_constant_init_1 ../../gcc/cp/constexpr.c:7593 0xaa9b0b maybe_constant_init(tree_node*, tree_node*, bool) ../../gcc/cp/constexpr.c:7610 0xaa98e5 fold_non_dependent_init(tree_node*, int, bool, tree_node*) ../../gcc/cp/constexpr.c:7564 0xe4f994 store_init_value(tree_node*, tree_node*, vec**, int) ../../gcc/cp/typeck2.c:767 0xb3807b check_initializer ../../gcc/cp/decl.c:7028 0xb3d512 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) ../../gcc/cp/decl.c:7946 0xcbda72 cp_parser_decomposition_declaration ../../gcc/cp/parser.c:14663 The clang++ diagnostics doesn't make any sense either: error: cannot decompose non-class, non-array type 'int *' but doesn't crash the compiler.=