On Fri, Jan 03, 2025 at 12:39:08PM +0100, Jakub Jelinek wrote: > Should be all !DECL_NAME (decl) MK_unique? Or just > DECL_DECOMPOSITION_P (decl) && !DECL_NAME (decl)? > Structured bindings can't be redeclared, so I guess they are unique.
With --- gcc/cp/module.cc.jj 2025-01-02 11:47:10.367499411 +0100 +++ gcc/cp/module.cc 2025-01-03 13:22:38.529485672 +0100 @@ -10985,6 +10985,12 @@ trees_out::get_merge_kind (tree decl, de break; } + if (DECL_DECOMPOSITION_P (decl)) + { + mk = MK_unique; + break; + } + if (IDENTIFIER_ANON_P (DECL_NAME (decl))) { if (RECORD_OR_UNION_TYPE_P (ctx)) instead the second testcase doesn't ICE during -fmodule-header saving anymore, but during import (on the simplified testcase): 0x11ba712 crash_signal ../../gcc/toplev.cc:322 0x891d9b is_bitfield_expr_with_lowered_type(tree_node const*) ../../gcc/cp/typeck.cc:2403 0x8920c0 is_bitfield_expr_with_lowered_type(tree_node const*) ../../gcc/cp/typeck.cc:2443 0x892105 is_bitfield_expr_with_lowered_type(tree_node const*) ../../gcc/cp/typeck.cc:2449 0x89215a unlowered_expr_type(tree_node const*) ../../gcc/cp/typeck.cc:2468 0x4270a2 build_new_op(op_location_t const&, tree_code, int, tree_node*, tree_node*, tree_node*, tree_node*, tree_node**, int) ../../gcc/cp/call.cc:7153 0x89a2e1 build_x_binary_op(op_location_t const&, tree_code, tree_node*, tree_code, tree_node*, tree_code, tree_node*, tree_node**, int) ../../gcc/cp/typeck.cc:4794 0x6d4f64 cp_parser_binary_expression ../../gcc/cp/parser.cc:10818 0x6d556c cp_parser_assignment_expression ../../gcc/cp/parser.cc:10979 0x6d5aa8 cp_parser_expression ../../gcc/cp/parser.cc:11162 0x6ddfe1 cp_parser_condition ../../gcc/cp/parser.cc:14308 Jakub