https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104668
Bug ID: 104668 Summary: [12 Regression] ICE in lookup_attribute_spec, at attribs.cc:425 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Started between 20220123 and 20220130 : (derived from g++.dg/cpp0x/lambda/lambda-variadic15.C) $ cat z1.cc template <class... Ts> void sink(Ts...); template <class... Ts> void f(Ts...) { sink([] { struct alignas:Ts) S {}; }...); } } int main() { f(0); } $ g++-12-20220220 -c z1.cc z1.cc: In lambda function: z1.cc:5:20: internal compiler error: Segmentation fault 5 | sink([] { struct alignas:Ts) S {}; }...); } | ^~~~~~~ 0xda25ef crash_signal ../../gcc/toplev.cc:322 0x89f4f1 lookup_attribute_spec(tree_node const*) ../../gcc/attribs.cc:425 0x75217e is_late_template_attribute ../../gcc/cp/decl2.cc:1243 0x75217e splice_template_attributes(tree_node**, tree_node*) ../../gcc/cp/decl2.cc:1340 0x752b1e cplus_decl_attributes(tree_node**, tree_node*, int) ../../gcc/cp/decl2.cc:1662 0x7eabc8 cp_parser_class_head ../../gcc/cp/parser.cc:26646 0x7eabc8 cp_parser_class_specifier_1 ../../gcc/cp/parser.cc:25824 0x7eb670 cp_parser_class_specifier ../../gcc/cp/parser.cc:26204 0x7eb670 cp_parser_type_specifier ../../gcc/cp/parser.cc:19348 0x7ec1a6 cp_parser_decl_specifier_seq ../../gcc/cp/parser.cc:15911 0x7ecd61 cp_parser_simple_declaration ../../gcc/cp/parser.cc:15159 0x7ee769 cp_parser_declaration_statement ../../gcc/cp/parser.cc:14367 0x7eed6b cp_parser_statement ../../gcc/cp/parser.cc:12452 0x7efcb4 cp_parser_statement_seq_opt ../../gcc/cp/parser.cc:12856 0x7efd6f cp_parser_compound_statement ../../gcc/cp/parser.cc:12808 0x7f0778 cp_parser_function_body ../../gcc/cp/parser.cc:25062 0x7f0778 cp_parser_lambda_body ../../gcc/cp/parser.cc:11799 0x7f0778 cp_parser_lambda_expression ../../gcc/cp/parser.cc:11118 0x7f0778 cp_parser_primary_expression ../../gcc/cp/parser.cc:5700 0x7f3725 cp_parser_postfix_expression ../../gcc/cp/parser.cc:7652