https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65817
--- Comment #2 from Jan Kratochvil jan.kratochvil at redhat dot com ---
Created attachment 35369
-- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35369action=edit
Attempted GCC fix.
With this GCC fix and the GDB reproducer it looks as fixed:
gdb command line:1:1: error: invalid use of incomplete typedef ‘({anonymous})’
But after running gdb.compile/compile.exp one gets another crash so this GCC
fix is probably not right.
compile code struct_object.selffield = struct_object^M
gdb command line:1:1: error: cannot convert gdb type to gcc type^M
*** WARNING *** there are active plugins, do not report this as a bug unless
you can reproduce it without enabling any plugins.^M
Event| Plugins^M
PLUGIN_PRE_GENERICIZE| libcc1plugin^M
PLUGIN_GGC_MARKING | libcc1plugin^M
PLUGIN_PRAGMAS | libcc1plugin^M
gdb command line:1:1: internal compiler error: tree check: expected class
'type', have 'exceptional' (error_mark) in plugin_build_add_field, at
libcc1/plugin.cc:533^M
0xd7d007 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)^M
../../gccgitatsign/gcc/tree.c:9350^M
0x7f61d20f1084 tree_class_check(tree_node*, tree_code_class, char const*, int,
char const*)^M
../../gccgitatsign/libcc1/../gcc/tree.h:2969^M
0x7f61d20ef461 plugin_build_add_field(cc1_plugin::connection*, unsigned long
long, char const*, unsigned long long, unsigned long, unsigned long)^M
../../gccgitatsign/libcc1/plugin.cc:533^M
0x7f61d20f6407 cc1_plugin::connection::do_wait(bool)^M
../../gccgitatsign/libcc1/connection.cc:144^M
0x7f61d20f12be cc1_plugin::connection::wait_for_result()^M
../../gccgitatsign/libcc1/connection.hh:72^M
0x7f61d20f1edd cc1_plugin::status cc1_plugin::callint, gcc_c_oracle_request,
char const*(cc1_plugin::connection*, char const*, int*, gcc_c_oracle_request,
char const*)^M
../../gccgitatsign/libcc1/rpc.hh:227^M
0x7f61d20ee778 plugin_binding_oracle^M
../../gccgitatsign/libcc1/plugin.cc:278^M
0x5fe398 i_symbol_binding^M
../../gccgitatsign/gcc/c/c-decl.c:268^M
0x5fe398 lookup_name(tree_node*)^M
../../gccgitatsign/gcc/c/c-decl.c:3896^M
0x645e44 c_lex_one_token^M
../../gccgitatsign/gcc/c/c-parser.c:363^M
0x663633 c_parser_peek_token^M
../../gccgitatsign/gcc/c/c-parser.c:440^M
0x663633 c_parser_next_token_is^M
../../gccgitatsign/gcc/c/c-parser.c:452^M
0x663633 c_parser_compound_statement_nostart^M
../../gccgitatsign/gcc/c/c-parser.c:4557^M
0x66399e c_parser_compound_statement^M
../../gccgitatsign/gcc/c/c-parser.c:4538^M
0x661a67 c_parser_statement_after_labels^M
../../gccgitatsign/gcc/c/c-parser.c:4964^M
0x663173 c_parser_compound_statement_nostart^M
../../gccgitatsign/gcc/c/c-parser.c:4701^M
0x66399e c_parser_compound_statement^M
../../gccgitatsign/gcc/c/c-parser.c:4538^M
0x65fc80 c_parser_declaration_or_fndef^M
../../gccgitatsign/gcc/c/c-parser.c:1982^M
0x669a97 c_parser_external_declaration^M
../../gccgitatsign/gcc/c/c-parser.c:1452^M
0x66a359 c_parser_translation_unit^M
../../gccgitatsign/gcc/c/c-parser.c:1339^M
Please submit a full bug report,^M
with preprocessed source if appropriate.^M
Please include the complete backtrace with any bug report.^M
See http://gcc.gnu.org/bugs.html for instructions.^M
Compilation failed.^M
(gdb) FAIL: gdb.compile/compile.exp: compile code struct_object.selffield =
struct_object
BTW the GDB patch is wrong, it is used only as a reproducer of the GCC crash.