https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100616
--- Comment #2 from wang ivor <amorvincitomnia.iw at gmail dot com> --- One workaround I found is to always use templates to refer to C inside modules and only ever instantiate them in the outermost translation units. Or, if you only instantiate C with template arguments of primitive types (e.g. int, char, pointer types of primitive types, etc.) this bug doesn't happen.