https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108205
Nathaniel Shead <nshead at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2024-12-19 Keywords| |c++-contracts Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Blocks| |103524 CC| |nshead at gcc dot gnu.org --- Comment #1 from Nathaniel Shead <nshead at gcc dot gnu.org> --- Confirmed. Slightly reduced: // test.cpp export module test; export void foo() [[post: true]] {} $ g++ -fmodules -fcontracts test.cpp test.cpp:1:8: internal compiler error: in add_binding_entity, at cp/module.cc:13465 1 | export module test; | ^~~~~~ 0x3cd9843 internal_error(char const*, ...) ../../gcc/gcc/diagnostic-global-context.cc:517 0x3ca4ecc fancy_abort(char const*, int, char const*) ../../gcc/gcc/diagnostic.cc:1704 0x1116607 depset::hash::add_binding_entity(tree_node*, WMB_Flags, void*) ../../gcc/gcc/cp/module.cc:13465 0x1157e06 walk_module_binding(tree_node*, bitmap_head*, bool (*)(tree_node*, WMB_Flags, void*), void*) ../../gcc/gcc/cp/name-lookup.cc:4313 0x111689c depset::hash::add_namespace_entities(tree_node*, bitmap_head*) ../../gcc/gcc/cp/module.cc:13505 0x112728c module_state::write_begin(elf_out*, cpp_reader*, module_state_config&, unsigned int&) ../../gcc/gcc/cp/module.cc:18595 0x112ee96 finish_module_processing(cpp_reader*) ../../gcc/gcc/cp/module.cc:21076 0x104e39e c_parse_final_cleanups() ../../gcc/gcc/cp/decl2.cc:5542 0x143473d c_common_parse_file() ../../gcc/gcc/c-family/c-opts.cc:1407 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. The bug does not occur if we do not export the function. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524 [Bug 103524] [meta-bug] modules issue