https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99436
Bug ID: 99436 Summary: ICE in get_cxx_dialect_name, at cp/name-lookup.c:6955 when using modules on C++23 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: italolmm2018 at outlook dot com Target Milestone: --- ICE when trying to 'export module' under C++23/C++2B: gcc version 11.0.1 20210306 (experimental), configured with: ../configure --target=i686-elf --prefix=/home/italo/chos/toolchain/kernel/x86/out --enable-languages=c,c++ --enable-lto --disable-multilib --without-headers --disable-nls --disable-werror Command line and output: $ x86_64-elf-g++ -std=c++2b -fmodules-ts -c test.cxx test.cxx:1:8: internal compiler error: in get_cxx_dialect_name, at cp/name-lookup.c:6955 1 | export module test; | ^~~~~~ 0x67dca0 get_cxx_dialect_name(cxx_dialect) ../../gcc/cp/name-lookup.c:6955 0x680a49 get_cxx_dialect_name(cxx_dialect) ../../gcc/tree.h:3353 0x9e1056 module_state_config::get_dialect() ../../gcc/cp/module.cc:14443 0x9f7a74 module_state_config::module_state_config() ../../gcc/cp/module.cc:14416 0x9f7a74 module_state::write(elf_out*, cpp_reader*) ../../gcc/cp/module.cc:17663 0x9f8caf finish_module_processing(cpp_reader*) ../../gcc/cp/module.cc:19875 0x98cf4b c_parse_final_cleanups() ../../gcc/cp/decl2.c:5175 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. The contents of the test.cxx file are just 'export module test;', and it builds normally when using -std=c++20.