https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114685
Bug ID: 114685 Summary: [modules] ICE when exporting a type through a different alias then one declared in GMF Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: m.cencora at gmail dot com Target Milestone: --- $ cat lldiv_t.cpp module; #include "lldiv_t.h" export module std; export namespace std { using ::__gnu_cxx::lldiv_t; } $ cat lldiv_t.h #pragma once struct lldiv_t{}; namespace __gnu_cxx { using ::lldiv_t; } namespace std { using ::lldiv_t; } $ g++ -std=gnu++2b -isystem $PWD -fmodules-ts lldiv_t.cpp lldiv_t.cpp:5:8: internal compiler error: in add_binding_entity, at cp/module.cc:12992 5 | export module std; | ^~~~~~ 0x772540 depset::hash::add_binding_entity(tree_node*, WMB_Flags, void*) ../../src/gcc/cp/module.cc:12992 0x1049b77 walk_module_binding(tree_node*, bitmap_head*, bool (*)(tree_node*, WMB_Flags, void*), void*) ../../src/gcc/cp/name-lookup.cc:4224 0x1017341 depset::hash::add_namespace_entities(tree_node*, bitmap_head*) ../../src/gcc/cp/module.cc:13032 0x1031c89 module_state::write_begin(elf_out*, cpp_reader*, module_state_config&, unsigned int&) ../../src/gcc/cp/module.cc:17968 0x1033244 finish_module_processing(cpp_reader*) ../../src/gcc/cp/module.cc:20340 0xfbcbc1 c_parse_final_cleanups() ../../src/gcc/cp/decl2.cc:5354 0x120ef68 c_common_parse_file() ../../src/gcc/c-family/c-opts.cc:1329 Works fine on gcc-13. Reduced from an implementation of "std" module.