https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99208

            Bug ID: 99208
           Summary: [modules] ICE with partitions & instantiations of
                    linkage-typedef structs
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: nathan at gcc dot gnu.org
  Target Milestone: ---

Triaging 98718 ran into this:

// b_a.ii
module;
# 3 "b_a.ii" 1
typedef struct {} __mbstate_t;
template<typename _StateT> class fpos;
# 6 "" 2
export module hello:format;
export void format (const fpos<__mbstate_t> &);

// b_b.ii
export module hello;
export import :format;

zathras:94>./cc1plus -quiet -fmodules-ts b_a.ii && ./cc1plus -quiet
-fmodules-ts b_b.ii    
b_b.ii:1:8: internal compiler error: in insert, at cp/module.cc:4904
    1 | export module hello;
      |        ^~~~~~
0xcb1949 trees_out::insert(tree_node*, walk_kind)
        ../../../src/gcc/cp/module.cc:4904
0xcbaf8f trees_out::add_indirects(tree_node*)
        ../../../src/gcc/cp/module.cc:7328
0xcc1f6a trees_out::decl_node(tree_node*, walk_kind)
        ../../../src/gcc/cp/module.cc:8677
0xcc41c1 trees_out::tree_node(tree_node*)
        ../../../src/gcc/cp/module.cc:9179
0xcb1e4e trees_out::vec_chained_decls(tree_node*)
        ../../../src/gcc/cp/module.cc:4992
0xcd17a0 trees_out::write_class_def(tree_node*)
        ../../../src/gcc/cp/module.cc:11748
0xcd5947 trees_out::write_definition(tree_node*)
        ../../../src/gcc/cp/module.cc:12356
0xcd9299 depset::hash::find_dependencies(module_state*)
        ../../../src/gcc/cp/module.cc:13238
0xce60ed module_state::write(elf_out*, cpp_reader*)
        ../../../src/gcc/cp/module.cc:17611
0xcec92c finish_module_processing(cpp_reader*)
        ../../../src/gcc/cp/module.cc:19860

Reply via email to