https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103703
Bug ID: 103703
Summary: ICE with -Wmismatched-tags
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
% cat test.cpp
template <typename T> struct A { struct B { }; };
template <typename T> struct C { friend struct A <C>::B; };
% g++ -Wmismatched-tags test.cpp
test.cpp:2:59: internal compiler error: Segmentation fault
2 | template <typename T> struct C { friend struct A <C>::B; };
| ^
0x1786229 internal_error(char const*, ...)
???:0
0x78c6ed class_decl_loc_t::diag_mismatched_tags(tree_node*)
???:0
0x790955 class_decl_loc_t::diag_mismatched_tags()
???:0
0x7c482e c_parse_file()
???:0
0x896762 c_common_parse_file()
???:0
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.
Compiler returned: 1