https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114630
--- Comment #6 from Patrick Palka <ppalka at gcc dot gnu.org> --- (In reply to Nathaniel Shead from comment #5) > That said, my version doesn't actually solve the underlying issue: my > adjustment of your testcase to put instantiations into the module purview > (and force emission there) still gives the same error for me. So it sounds > like there's something else being affected by DECL_MODULE_PURVIEW_P being > set when maybe it shouldn't for an explicit specialisation. Interesting, I guess one difference with your approach is that for 114630_b.C we'll still end up installing the imported instantiations of _M_do_parse<int>()::A/B instead of instantiating them ourselves (within the GMF), and so DECL_MODULE_IMPORT_P will be set on these local type instantiations, and yet not on _M_do_parse<int>() because this function specialization was formed (but not instantiated) within the GMF. That seems like a weird inconsistency, that DECL_MODULE_IMPORT_P is set on the local types but not on the containing function..