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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase:
extern "C" void abort(void);
struct tt
{
  int *tt1 = new int{1};
  int bucket_count() const {return *tt1;}
};
struct A {
  template<typename T> thread_local static tt m;
};
template<typename T> thread_local tt A::m{};
int main() {
  if ( A::m<int>.bucket_count() != 1) abort();
  return 0;
}

Reply via email to