https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98893

--- Comment #3 from Nathaniel Shead <nshead at gcc dot gnu.org> ---
Actually this is not restricted to header modules, 'inline' functions in
regular modules cause the error as well:

  // a.cpp
  export module A;
  struct S {
    ~S() {}
  };
  inline void foo() {
    static S a[1];
  }

  // a_impl.cpp
  module A;
  S b[1];
  void bar() { foo(); }

g++ -fmodules -c a.cpp a_impl.cpp:

/tmp/ccGtN85l.s: Assembler messages:
/tmp/ccGtN85l.s:95: Error: symbol `__tcf_0' is already defined
/tmp/ccGtN85l.s: Error: .size expression for __tcf_0 does not evaluate to a
constant

Reply via email to