https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99879
--- Comment #1 from Alexander Lelyakin <alexander.lelyakin at googlemail dot com> --- There is a shorter sequence: /usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header memory /usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstdio /usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header span /usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header shared_mutex /usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstdint /usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header clocale /usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header bitset /usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header semaphore /usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header exception /usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header numbers /usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header charconv /usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header locale /usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header string /usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ranges /usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstring /usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header regex ---- In module imported at /usr/local/include/c++/11.0.1/regex:53: /usr/local/include/c++/11.0.1/cstring: note: unable to represent further imported source locations /usr/local/include/c++/11.0.1/regex:53: internal compiler error: in open, at cp/module.cc:13628 53 | #include <cstring> | 0x6df11d loc_spans::open(unsigned int) ../../gcc/gcc/cp/module.cc:13628 0xa62db5 preprocess_module(module_state*, unsigned int, bool, bool, bool, cpp_reader*) ../../gcc/gcc/cp/module.cc:19432 0xa2ccef module_token_filter::resume(int, int, tree_node*, unsigned int) ../../gcc/gcc/cp/lex.c:520 0xa2ccef module_token_lang(int, int, tree_node*, unsigned int, unsigned long) ../../gcc/gcc/cp/lex.c:557 0xae0d53 cp_lexer_new_main ../../gcc/gcc/cp/parser.c:660 0xae0d53 c_parse_file() ../../gcc/gcc/cp/parser.c:45264 0xc05d0d 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 20210408 (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.