https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82953
--- Comment #1 from Sergei Trofimovich ---
gdb backtrace:
(gdb) bt
#0 any_dependent_bases_p (type=type@entry=0x7003f7e0) at
../../gcc/gcc/cp/search.c:2617
#1 0x0083ee53 in finish_class_member_access_expr (object=...,
name=, name@entry=0x7003a780,
template_p=, complain=complain@entry=3) at
../../gcc/gcc/cp/typeck.c:2848
#2 0x00733b99 in cp_parser_postfix_dot_deref_expression
(parser=parser@entry=0x70006688, token_type=CPP_DOT,
postfix_expression=..., for_offsetof=for_offsetof@entry=false,
idk=idk@entry=0x7fffc0a0, location=location@entry=28800)
at ../../gcc/gcc/cp/parser.c:7693
#3 0x00740ddf in cp_parser_postfix_expression
(parser=parser@entry=0x70006688, address_p=,
cast_p=,
member_access_only_p=member_access_only_p@entry=false, decltype_p=, pidk_return=)
at ../../gcc/gcc/cp/parser.c:7267
#4 0x0074472e in cp_parser_unary_expression
(parser=parser@entry=0x70006688, pidk=pidk@entry=0x0,
address_p=address_p@entry=false, cast_p=cast_p@entry=false,
decltype_p=decltype_p@entry=false) at ../../gcc/gcc/cp/parser.c:8363
#5 0x007214ad in cp_parser_cast_expression
(parser=parser@entry=0x70006688, address_p=address_p@entry=false,
cast_p=cast_p@entry=false, decltype_p=decltype_p@entry=false, pidk=0x0) at
../../gcc/gcc/cp/parser.c:9131
#6 0x00721d48 in cp_parser_binary_expression
(parser=parser@entry=0x70006688, cast_p=cast_p@entry=false,
no_toplevel_fold_p=no_toplevel_fold_p@entry=false,
decltype_p=decltype_p@entry=false, prec=prec@entry=PREC_NOT_OPERATOR, pidk=0x0)
at ../../gcc/gcc/cp/parser.c:9232
#7 0x00723865 in cp_parser_assignment_expression
(parser=parser@entry=0x70006688, pidk=pidk@entry=0x0,
cast_p=cast_p@entry=false, decltype_p=decltype_p@entry=false) at
../../gcc/gcc/cp/parser.c:9519
#8 0x007240d9 in cp_parser_expression
(parser=parser@entry=0x70006688, pidk=pidk@entry=0x0,
cast_p=cast_p@entry=false,
decltype_p=decltype_p@entry=false) at ../../gcc/gcc/cp/parser.c:9688
#9 0x007262a9 in cp_parser_expression_statement
(parser=parser@entry=0x70006688,
in_statement_expr=in_statement_expr@entry=0x0)
at ../../gcc/gcc/cp/parser.c:11205
#10 0x0072d464 in cp_parser_statement
(parser=parser@entry=0x70006688,
in_statement_expr=in_statement_expr@entry=0x0,
in_compound=, in_compound@entry=true, if_p=if_p@entry=0x0,
chain=chain@entry=0x0,
loc_after_labels=loc_after_labels@entry=0x0) at
../../gcc/gcc/cp/parser.c:11021
#11 0x0072e671 in cp_parser_statement_seq_opt
(parser=parser@entry=0x70006688,
in_statement_expr=in_statement_expr@entry=0x0)
at ../../gcc/gcc/cp/parser.c:11348
#12 0x0072e748 in cp_parser_compound_statement
(parser=parser@entry=0x70006688,
in_statement_expr=in_statement_expr@entry=0x0,
bcs_flags=bcs_flags@entry=0, function_body=function_body@entry=true) at
../../gcc/gcc/cp/parser.c:11302
#13 0x00748901 in cp_parser_function_body (in_function_try_block=false,
parser=0x70006688) at ../../gcc/gcc/cp/parser.c:21837
#14 cp_parser_ctor_initializer_opt_and_function_body
(parser=parser@entry=0x70006688,
in_function_try_block=in_function_try_block@entry=false) at
../../gcc/gcc/cp/parser.c:21874
#15 0x0074a33b in cp_parser_function_definition_after_declarator
(parser=parser@entry=0x70006688, inline_p=inline_p@entry=false)
at ../../gcc/gcc/cp/parser.c:26765
#16 0x0074b07e in
cp_parser_function_definition_from_specifiers_and_declarator
(declarator=, attributes=0x0,
decl_specifiers=0x7fffca10, parser=0x70006688) at
../../gcc/gcc/cp/parser.c:26681
#17 cp_parser_init_declarator (parser=parser@entry=0x70006688,
decl_specifiers=decl_specifiers@entry=0x7fffca10,
checks=checks@entry=0x0,
function_definition_allowed_p=function_definition_allowed_p@entry=true,
member_p=member_p@entry=false,
declares_class_or_enum=,
function_definition_p=0x7fffca0b, maybe_range_for_decl=0x0, init_loc=0x0,
auto_result=0x0)
at ../../gcc/gcc/cp/parser.c:19540
#18 0x0075114b in cp_parser_single_declaration
(parser=parser@entry=0x70006688, checks=checks@entry=0x0,
member_p=member_p@entry=false,
explicit_specialization_p=explicit_specialization_p@entry=false,
friend_p=friend_p@entry=0x7fffcaf7)
at ../../gcc/gcc/cp/parser.c:27221
#19 0x0075134d in cp_parser_template_declaration_after_parameters
(parser=parser@entry=0x70006688,
parameter_list=parameter_list@entry=0x700315a0,
member_p=member_p@entry=false) at ../../gcc/gcc/cp/parser.c:26823
#20 0x00751d17 in cp_parser_explicit_template_declaration
(member_p=false, parser=0x70006688) at ../../gcc/gcc/cp/parser.c:27060
#21 cp_parser_template_declaration_after_export
(parser=parser@entry=0x70006688, member_p=)
at ../../gcc/gcc/cp/parser.c:27079
#22 0x00752059 in