https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114170
Bug ID: 114170 Summary: [modules] error streaming in header unit with instantiated variable template with non-trivial initializer Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: ppalka at gcc dot gnu.org Target Milestone: --- $ cat testcase.H inline int f() { return 42; } template<class> inline int v = f(); inline int g() { return v<int>; } $ cat testcase.C import "testcase.H"; int main() { return v<int> != 42; } $ g++ -fmodules-ts testcase.{H,C} In module imported at testcase.C:1:1: testcase.H: error: failed to read compiled module: Bad file data testcase.H: note: compiled module file is ‘gcm.cache/,/testcase.H.gcm’ testcase.H: fatal error: returning to the gate for a mechanical issue