https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114229
Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=112820 Ever confirmed|0 |1 Last reconfirmed| |2024-03-05 Known to fail| |13.2.0, 14.0 Status|UNCONFIRMED |NEW --- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> --- Confirmed, thanks for the bug report. Reduced (needs -fno-module-lazy): $ cat 114229_a.C module; template<class> struct basic_streambuf { virtual void overflow() { } }; extern template struct basic_streambuf<long>; export module modA; export basic_streambuf<long> *p; $ cat 114229_b.C export module modB; import modA; $ cat 114229_c.C import modA; import modB; int main() { } $ cat 114229_d.C template<class> struct basic_streambuf { virtual void overflow() { } }; template struct basic_streambuf<long>; $ g++ -Wno-global-module -fmodules-ts -fno-module-lazy 114229_*.C /usr/bin/ld: /tmp/ccNDPhFZ.o:(.rodata+0x0): multiple definition of `vtable for basic_streambuf<long>'; /tmp/ccW7B4xy.o:(.rodata+0x0): first defined here PR112820 also was extern template related.