// PR c++/114630 // { dg-additional-options "-fmodules-ts -Wno-global-module -fdump-lang-module" } // { dg-module-cmi M } module; template struct allocator { allocator() {} }; template class allocator; // Deferred instantiation of GM virtual functions or friend functions // should not place newly discovered declarations in the module purview. template void go() { extern T fn_decl(); } template struct S { friend void x() {} virtual void f() { go(); } }; inline S s; export module M; // The whole GMF should be discarded here // { dg-final { scan-lang-dump "Wrote 0 clusters" module } }