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

--- Comment #2 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
// B_a.ii
template<typename _T1>
struct pair
{
  inline void Frob ();
};

// B_b.ii
import  "./B_a.ii"

template<class _T1>
inline  void pair<_T1>::Frob()
{ }


./cc1plus -quiet -std=c++20 -fmodule-header  -fpreprocessed B_a.ii && ./cc1plus
-quiet -std=c++20 -fmodule-header  -fpreprocessed B_b.ii
B_b.ii:1: internal compiler error: in make_dependency, at cp/module.cc:12523
    1 | import  "./B_a.ii" [[__translated]];
      | 
0xcd61da depset::hash::make_dependency(tree_node*, depset::entity_kind)
        ../../../src/gcc/cp/module.cc:12523
0xcd7f54 depset::hash::add_class_entities(vec<tree_node*, va_gc, vl_embed>*)
        ../../../src/gcc/cp/module.cc:12942
0xce60bb module_state::write(elf_out*, cpp_reader*)
        ../../../src/gcc/cp/module.cc:17604

The module flags on the TEMPLATE_DECL do not match those of the
DECL_TEMPLATE_RESULT.

Reply via email to