c++: instantiating imported specializations [PR 99389]
authorNathan Sidwell <nathan@acm.org>
Fri, 5 Mar 2021 13:25:54 +0000 (05:25 -0800)
committerNathan Sidwell <nathan@acm.org>
Fri, 5 Mar 2021 13:30:30 +0000 (05:30 -0800)
commit4d66685e49d20e0c7a87c5fa0757c7eb63ffcdaa
tree410931856c16fb40085fe89081ec45dbcaeda938
parent331763de7d4850702a0f67298f36017c73cdb103
c++: instantiating imported specializations [PR 99389]

When an incomplete class specialization is imported, and is completed
by instantiation, we were failing to mark the instantiation, and thus
didn't stream it out.  Leading to errors in importing as we had
members of an incomplete type.

PR c++/99389
gcc/cp/
* pt.c (instantiate_class_template_1): Set instantiating module
here.
gcc/testsuite/
* g++.dg/modules/pr99389_a.H: New.
* g++.dg/modules/pr99389_b.C: New.
* g++.dg/modules/pr99389_c.C: New.
gcc/cp/pt.c
gcc/testsuite/g++.dg/modules/pr99389_a.H [new file with mode: 0644]
gcc/testsuite/g++.dg/modules/pr99389_b.C [new file with mode: 0644]
gcc/testsuite/g++.dg/modules/pr99389_c.C [new file with mode: 0644]