https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95672
Bug ID: 95672
Summary: ICE in cxx_incomplete_type_diagnostic, at
cp/typeck2.c:584
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
$cat bug.cc
struct g_class : decltype (auto) ... { } ;
$g++ bug.cc
bug.cc:1:35: internal compiler error: in cxx_incomplete_type_diagnostic, at
cp/typeck2.c:584
1 | struct g_class : decltype (auto) ... { } ;
| ^~~
0x5cef74 cxx_incomplete_type_diagnostic(unsigned int, tree_node const*,
tree_node const*, diagnostic_t)
../../gcc/cp/typeck2.c:584
0x77b9af cxx_incomplete_type_diagnostic(tree_node const*, tree_node const*,
diagnostic_t)
../../gcc/cp/cp-tree.h:7705
0x77b9af complete_type_or_maybe_complain(tree_node*, tree_node*, int)
../../gcc/cp/typeck.c:156
0x77b9af complete_type_or_else(tree_node*, tree_node*)
../../gcc/cp/typeck.c:166
0x685881 xref_basetypes(tree_node*, tree_node*)
../../gcc/cp/decl.c:15099
0x6edfe9 cp_parser_class_head
../../gcc/cp/parser.c:24717
0x6edfe9 cp_parser_class_specifier_1
../../gcc/cp/parser.c:23874
0x6ee273 cp_parser_class_specifier
../../gcc/cp/parser.c:24248
0x6ee273 cp_parser_type_specifier
../../gcc/cp/parser.c:17762
0x6ef092 cp_parser_decl_specifier_seq
../../gcc/cp/parser.c:14410
0x6efbb1 cp_parser_simple_declaration
../../gcc/cp/parser.c:13664
0x7159c6 cp_parser_declaration
../../gcc/cp/parser.c:13484
0x7160b4 cp_parser_translation_unit
../../gcc/cp/parser.c:4761
0x7160b4 c_parse_file()
../../gcc/cp/parser.c:44034
0x7de74b c_common_parse_file()
../../gcc/c-family/c-opts.c:1190
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
$g++ --version
g++ (GCC) 11.0.0 20200605 (experimental)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.