https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98885
--- Comment #6 from Pilar Latiesa <pilarlatiesa at gmail dot com> --- (In reply to Nathan Sidwell from comment #5) > your A-impl.cpp needs `import :B` and vice-versa Yep. Thanks. But that's not enough for it to compile: A-impl.cpp:7:17: error: invalid use of incomplete type ‘class A@M:B’ 7 | A::f(B const &) const {} | ^~~~~ In module M:B, imported at A-impl.cpp:4: B.cpp:4:14: note: forward declaration of ‘class A@M:B’ 4 | export class A; | ^ A-impl.cpp:2:1: warning: not writing module ‘M:A’ due to errors 2 | module M:A; | ^~~~~~ In module imported at B-impl.cpp:4:1: M:A: error: failed to read compiled module: No such file or directory M:A: note: compiled module file is ‘gcm.cache/M-A.gcm’ M:A: note: imports must be built before being imported M:A: fatal error: returning to the gate for a mechanical issue compilation terminated.