// PR c++/115801 // { dg-additional-options "-fmodules-ts -Wno-global-module" } // { dg-module-cmi test } module; template struct GMF; template struct GMF_Hidden { int go() { GMF gmf; return gmf.x; } }; template struct GMF { private: template friend struct ::GMF_Hidden; int x = 1; }; template int test_gmf() { GMF_Hidden h; return h.go(); } export module test; export using ::GMF; export using ::test_gmf; export template struct Attached; template struct Attached_Hidden { int go() { Attached attached; return attached.x; } }; template struct Attached { private: template friend struct ::Attached_Hidden; int x = 2; }; export template int test_attached() { Attached_Hidden h; return h.go(); }