https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99283
--- Comment #22 from Alexander Lelyakin <alexander.lelyakin at googlemail dot com> --- Clean rebuild do not change things: /home/sasha/GCC/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header streambuf /home/sasha/GCC/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header type_traits /home/sasha/GCC/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header valarray ---- In file included from /home/sasha/GCC/include/c++/11.0.1/iterator:66, from /home/sasha/GCC/include/c++/11.0.1/bits/ranges_algobase.h:36, from /home/sasha/GCC/include/c++/11.0.1/bits/ranges_algo.h:35, from /home/sasha/GCC/include/c++/11.0.1/algorithm:64, from /home/sasha/GCC/include/c++/11.0.1/valarray:38: /home/sasha/GCC/include/c++/11.0.1/bits/streambuf_iterator.h:53:5: internal compiler error: in assert_definition, at cp/module.cc:4492 53 | { | ^ 0x6e31c7 trees_in::assert_definition(tree_node*, bool) ../../gcc/gcc/cp/module.cc:4492 0xa5eed0 trees_in::odr_duplicate(tree_node*, bool) ../../gcc/gcc/cp/module.cc:11323 0xa6e5af trees_in::read_function_def(tree_node*, tree_node*) ../../gcc/gcc/cp/module.cc:11403 0xa70aa1 module_state::read_cluster(unsigned int) ../../gcc/gcc/cp/module.cc:14817 0xa7111d module_state::load_section(unsigned int, binding_slot*) ../../gcc/gcc/cp/module.cc:18079 0xa711df module_state::lazy_load(unsigned int, binding_slot*) ../../gcc/gcc/cp/module.cc:18737 0xa6b460 trees_in::tree_node(bool) ../../gcc/gcc/cp/module.cc:9661 0xa7091b module_state::read_cluster(unsigned int) ../../gcc/gcc/cp/module.cc:14714 0xa7111d module_state::load_section(unsigned int, binding_slot*) ../../gcc/gcc/cp/module.cc:18079 0xa711df module_state::lazy_load(unsigned int, binding_slot*) ../../gcc/gcc/cp/module.cc:18737 0xa74337 lazy_load_pendings(tree_node*) ../../gcc/gcc/cp/module.cc:18830 0xb7eed5 complete_type(tree_node*) ../../gcc/gcc/cp/typeck.c:140 0xb3fe22 lookup_member(tree_node*, tree_node*, int, bool, int, access_failure_info*) ../../gcc/gcc/cp/search.c:1148 0xa79195 get_class_binding ../../gcc/gcc/cp/name-lookup.c:5333 0xa8065f outer_binding(tree_node*, cxx_binding*, bool) ../../gcc/gcc/cp/name-lookup.c:7649 0xa808af innermost_non_namespace_value(tree_node*) ../../gcc/gcc/cp/name-lookup.c:7686 0xae6547 check_template_shadow(tree_node*) ../../gcc/gcc/cp/pt.c:4379 0xa7ced1 push_class_level_binding_1 ../../gcc/gcc/cp/name-lookup.c:5418 0xa7d49e push_class_level_binding(tree_node*, tree_node*) ../../gcc/gcc/cp/name-lookup.c:5567 0xa7d49e pushdecl_class_level(tree_node*) ../../gcc/gcc/cp/name-lookup.c:5280 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.