c++: Local instantiations of imported specializations [PR 99377]
authorNathan Sidwell <nathan@acm.org>
Fri, 5 Mar 2021 18:34:23 +0000 (10:34 -0800)
committerNathan Sidwell <nathan@acm.org>
Fri, 5 Mar 2021 19:54:57 +0000 (11:54 -0800)
commit1e5cdb9f896fb220b26fd2080406504c4badf5af
tree535defa79bc6ca9de6a50d1f024e30ef44b417cd
parent3d9577c254003f2d18185015b75ce6e3e4af9ca2
c++: Local instantiations of imported specializations [PR 99377]

This turned out to be the function version of the previous fix.  We
can import an implicit specialization declaration that we need to
instantiate.  We must mark the instantiation so we remember to stream
it.

PR c++/99377
gcc/cp/
* pt.c (instantiate_decl): Call set_instantiating_module.
gcc/testsuite/
* g++.dg/modules/pr99377_a.H: New.
* g++.dg/modules/pr99377_b.C: New.
* g++.dg/modules/pr99377_c.C: New.
gcc/cp/pt.c
gcc/testsuite/g++.dg/modules/pr99377_a.H [new file with mode: 0644]
gcc/testsuite/g++.dg/modules/pr99377_b.C [new file with mode: 0644]
gcc/testsuite/g++.dg/modules/pr99377_c.C [new file with mode: 0644]