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

--- Comment #2 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
Thanks for checking this didn't seem a duplicate!

Reduced tescase:
// 99170_a.H
namespace STD {
class string {
public:
  template <typename T>
  string (const T *);
};
}

// 99170_b.C
export module test;
import "99170_a.H";
export class A {
  STD::string str{"ayyy"};
};

./cc1plus -fmodule-header -quiet -std=c++17 99170_a.H && ./cc1plus -fmodules-ts
-quiet -std=c++17 99170_b.C
99170_b.C:1:8: internal compiler error: in get_merge_kind, at
cp/module.cc:10169
    1 | export module test;
      |        ^~~~~~
0xcc98a8 trees_out::get_merge_kind(tree_node*, depset*)
        ../../../src/gcc/cp/module.cc:10169
0xcbd290 trees_out::decl_value(tree_node*, depset*)
        ../../../src/gcc/cp/module.cc:7629
0xcc2b15 trees_out::decl_node(tree_node*, walk_kind)
        ../../../src/gcc/cp/module.cc:8624
0xcc507f trees_out::tree_node(tree_node*)

Reply via email to