https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122699
--- Comment #2 from Nathaniel Shead <nshead at gcc dot gnu.org> ---
Reduced:
// a.cpp
export module M;
export namespace ns {
template <typename> struct S {
friend void f();
};
void f();
}
// b.cpp
export module X;
import M;
ns::S<int> s;
