https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112580
--- Comment #8 from Patrick Palka <ppalka at gcc dot gnu.org> --- Reduced testcase for the xtreme-header-{4,5,6} error: $ cat 112580_a.H template <typename _Tp> struct _Formatting_scanner { long long _M_unpacked_size; struct { int _M_values; }; virtual int _M_format_arg() { return _M_values; } }; _Formatting_scanner<int> s; $ cat 112580_b.C import "112580_a.H"; $ g++ -fmodules-ts 112580_a.H 112580_b.C In module 112580_a.H, imported at 112580_b.C:1: 112580_a.H: In instantiation of βint _Formatting_scanner<_Tp>::_M_format_arg() [with _Tp = int]β: 112580_a.H:7:15: required from here 7 | virtual int _M_format_arg() { return _M_values; } | ^~~~~~~~~~~~~ 112580_a.H:7:40: error: invalid use of non-static data member β_Formatting_scanner<int>::__as_base ::<anonymous>β 7 | virtual int _M_format_arg() { return _M_values; } | ^~~~~~~~~