https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97878
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- With extern int a[]; auto [b] = 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 ‘<structured bindings>’ 2 | auto [b] = a; | ^ pr97878-3.C:2:12: internal compiler error: in cxx_eval_outermost_constant_expr, 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<tree_node*, va_gc, vl_embed>**, 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.