https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99734
--- Comment #1 from Alexander Lelyakin <alexander.lelyakin at googlemail dot com> --- /usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header stdexcept /usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header filesystem ---- In file included from /usr/local/include/c++/11.0.1/bits/locale_classes.h:857, from /usr/local/include/c++/11.0.1/locale:39, from /usr/local/include/c++/11.0.1/bits/fs_path.h:37, from /usr/local/include/c++/11.0.1/filesystem:45: /usr/local/include/c++/11.0.1/bits/locale_classes.tcc:275:44: internal compiler error: in most_specialized_instantiation, at cp/pt.c:24830 275 | use_facet<collate<char> >(const locale&); | ^ 0x725070 most_specialized_instantiation(tree_node*) ../../gcc/gcc/cp/pt.c:24830 0xb2e1e9 determine_specialization ../../gcc/gcc/cp/pt.c:2457 0xb3418c determine_specialization ../../gcc/gcc/cp/pt.c:2156 0xb3418c check_explicit_specialization(tree_node*, tree_node*, int, int, tree_node*) ../../gcc/gcc/cp/pt.c:3121 0x9d481e grokfndecl ../../gcc/gcc/cp/decl.c:10064 0x9db1f3 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*, decl_context, int, tree_node**) ../../gcc/gcc/cp/decl.c:13910 0xac82c1 cp_parser_explicit_instantiation ../../gcc/gcc/cp/parser.c:18240 0xad8840 cp_parser_declaration ../../gcc/gcc/cp/parser.c:14096 0xad80e9 cp_parser_toplevel_declaration ../../gcc/gcc/cp/parser.c:14159 0xad80e9 cp_parser_declaration_seq_opt ../../gcc/gcc/cp/parser.c:13947 0xad8582 cp_parser_namespace_body ../../gcc/gcc/cp/parser.c:20447 0xad8582 cp_parser_namespace_definition ../../gcc/gcc/cp/parser.c:20425 0xad8cd8 cp_parser_declaration ../../gcc/gcc/cp/parser.c:14110 0xad952c cp_parser_toplevel_declaration ../../gcc/gcc/cp/parser.c:14159 0xad952c cp_parser_translation_unit ../../gcc/gcc/cp/parser.c:4942 0xad952c c_parse_file() ../../gcc/gcc/cp/parser.c:45250 0xbfd51d c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1218 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++ (GCC) 11.0.1 20210323 (experimental) Copyright (C) 2021 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.