https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84813
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P2 CC| |jason at gcc dot gnu.org Target Milestone|--- |6.5 Summary|internal compiler error: |[6/7 Regression] internal |Segmentation fault with |compiler error: |lambdas and constexpr |Segmentation fault with |variables |lambdas and constexpr | |variables --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The ICE started around r201080, but it isn't clear which exact revision. Initially it has been: pr84813.C: In function ‘void apply()’: pr84813.C:11:25: internal compiler error: tree check: expected lambda_expr, have decltype_type in cp_parser_lambda_expression, at cp/parser.c:8520 constexpr int N = T::N; ^ 0xf0a9ba tree_check_failed(tree_node const*, char const*, int, char const*, ...) ../../gcc/tree.c:9168 0x55211a tree_check(tree_node*, char const*, int, char const*, tree_code) ../../gcc/tree.h:3690 0x6a29a3 cp_parser_lambda_expression ../../gcc/cp/parser.c:8520 0x69b7bb cp_parser_primary_expression ../../gcc/cp/parser.c:4221 0x69e681 cp_parser_postfix_expression ../../gcc/cp/parser.c:5804 0x6a0aa7 cp_parser_unary_expression ../../gcc/cp/parser.c:7000 0x6a15fa cp_parser_cast_expression ../../gcc/cp/parser.c:7592 0x6a1668 cp_parser_binary_expression ../../gcc/cp/parser.c:7692 0x6a1d36 cp_parser_assignment_expression ../../gcc/cp/parser.c:7928 0x6a1fa0 cp_parser_expression ../../gcc/cp/parser.c:8090 0x6a21ad cp_parser_expression ../../gcc/cp/parser.c:8129 0x6a43b5 cp_parser_expression_statement ../../gcc/cp/parser.c:9384 0x6a404d cp_parser_statement ../../gcc/cp/parser.c:9235 0x6a49d3 cp_parser_statement_seq_opt ../../gcc/cp/parser.c:9509 0x6a48d4 cp_parser_compound_statement ../../gcc/cp/parser.c:9463 0x6b3431 cp_parser_function_body ../../gcc/cp/parser.c:18257 0x6b373a cp_parser_ctor_initializer_opt_and_function_body ../../gcc/cp/parser.c:18293 0x6ba671 cp_parser_function_definition_after_declarator ../../gcc/cp/parser.c:22271 0x6ba4c5 cp_parser_function_definition_from_specifiers_and_declarator ../../gcc/cp/parser.c:22192 0x6afbc2 cp_parser_init_declarator ../../gcc/cp/parser.c:16307 Starting with r210017 it segfaults in: #0 0x0000000000c605e1 in pointer_map_insert (pmap=0x0, p=0x7fffefcfa260) at ../../gcc/pointer-set.c:226 #1 0x00000000005fe413 in register_local_specialization (spec=0x7fffefd0c688, tmpl=0x7fffefcfa260) at ../../gcc/cp/pt.c:1731 #2 0x0000000000632299 in tsubst_decl (t=0x7fffefcfa260, args=0x7fffefcfea60, complain=0) at ../../gcc/cp/pt.c:11135 #3 0x0000000000638e1b in tsubst_copy (t=0x7fffefcfa260, args=0x7fffefcfea60, complain=0, in_decl=0x0) at ../../gcc/cp/pt.c:12636 #4 0x0000000000646e1c in tsubst_copy_and_build (t=0x7fffefcfa260, args=0x7fffefcfea60, complain=0, in_decl=0x0, function_p=false, ... inside dump_decl from decl_as_dwarf_string called during dwarf2out_type_decl. Obviously, we shouldn't try to do any tsubst during that. The r251433 changes are not backportable though.