https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106849
Bug ID: 106849 Summary: internal compiler error: tree check: expected none of template_decl, have template_decl in do_nonmember_using_decl, at cp/name-lookup.cc:4841 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Blocks: 103524 Target Milestone: --- I don't know if this is valid, but it shouldn't ICE: export module lib; namespace outer { template<typename T> void any_of(T) { } } export using outer::any_of; $ ~/gcc/13/bin/gcc -c -std=c++23 -fmodules-ts lib.cc lib.cc:7:21: internal compiler error: tree check: expected none of template_decl, have template_decl in do_nonmember_using_decl, at cp/name-lookup.cc:4841 7 | export using outer::any_of; | ^~~~~~ 0x887d60 tree_not_check_failed(tree_node const*, char const*, int, char const*, ...) /home/jwakely/src/gcc/gcc/gcc/tree.cc:8864 0x6eea80 tree_not_check(tree_node*, char const*, int, char const*, tree_code) /home/jwakely/src/gcc/gcc/gcc/tree.h:3529 0x6eea80 do_nonmember_using_decl /home/jwakely/src/gcc/gcc/gcc/cp/name-lookup.cc:4841 0xac2676 finish_nonmember_using_decl(tree_node*, tree_node*) /home/jwakely/src/gcc/gcc/gcc/cp/name-lookup.cc:6284 0xacaf04 finish_using_decl /home/jwakely/src/gcc/gcc/gcc/cp/parser.cc:21629 0xb113ce cp_parser_using_declaration /home/jwakely/src/gcc/gcc/gcc/cp/parser.cc:21757 0xb1eba6 cp_parser_declaration /home/jwakely/src/gcc/gcc/gcc/cp/parser.cc:15099 0xb1e794 cp_parser_module_export /home/jwakely/src/gcc/gcc/gcc/cp/parser.cc:14844 0xb1e794 cp_parser_declaration /home/jwakely/src/gcc/gcc/gcc/cp/parser.cc:15040 0xb1f432 cp_parser_toplevel_declaration /home/jwakely/src/gcc/gcc/gcc/cp/parser.cc:15120 0xb1f432 cp_parser_translation_unit /home/jwakely/src/gcc/gcc/gcc/cp/parser.cc:5068 0xb1f432 c_parse_file() /home/jwakely/src/gcc/gcc/gcc/cp/parser.cc:48594 0xc57221 c_common_parse_file() /home/jwakely/src/gcc/gcc/gcc/c-family/c-opts.cc:1255 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524 [Bug 103524] [meta-bug] modules issue