https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103057
Bug ID: 103057
Summary: Internal compiler error: Error reporting routines
re-entered
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: plasmahh at gmx dot net
Target Milestone: ---
Created attachment 51728
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51728&action=edit
cvise generated testcase
Compiling the attached testcase (generated with cvise out of a "real world"
piece of code, where supressing an "unused parameter" warning makes this go
away, due to the testcase being an error now, the error will trigger it too I
guess) with -std=gnu++2b (and likely some others) will ICE out:
Internal compiler error: Error reporting routines re-entered.
0xbd474d cxx_incomplete_type_diagnostic(unsigned int, tree_node const*,
tree_node const*, diagnostic_t)
../../gcc/cp/typeck2.c:330
0xb6629c cxx_incomplete_type_diagnostic(tree_node const*, tree_node const*,
diagnostic_t)
../../gcc/cp/cp-tree.h:8016
0xb6629c cxx_incomplete_type_error(tree_node const*, tree_node const*)
../../gcc/cp/cp-tree.h:8025
0xb6629c instantiate_class_template_1
../../gcc/cp/pt.c:12106
0xb66cd2 instantiate_class_template(tree_node*)
../../gcc/cp/pt.c:12302
0xbb58d9 complete_type(tree_node*)
../../gcc/cp/typeck.c:143
0xbb5a94 complete_type(tree_node*)
../../gcc/cp/typeck.c:169
0xbb5a94 complete_type_or_maybe_complain(tree_node*, tree_node*, int)
../../gcc/cp/typeck.c:156
0xb4ddb2 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/cp/pt.c:16069
0xb4ef9b tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
../../gcc/cp/pt.c:13411
0xb4caa2 tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/cp/pt.c:15449
0xa3266c dump_template_bindings
../../gcc/cp/error.c:482
0xa2bbba dump_function_decl
../../gcc/cp/error.c:1796
0xa33e0d decl_to_string
../../gcc/cp/error.c:3216
0xa33e0d cp_printer
../../gcc/cp/error.c:4387
0x1f9317c pp_format(pretty_printer*, text_info*)
../../gcc/pretty-print.c:1475
0x1f76b92 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
../../gcc/diagnostic.c:1342
0x1f770f6 diagnostic_impl
../../gcc/diagnostic.c:1504
0x1f7787f permerror(unsigned int, char const*, ...)
../../gcc/diagnostic.c:1771
0xa26072 c_parse_final_cleanups()
../../gcc/cp/decl2.c:5255