OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [tls/] [diag-1.C] - Rev 825

Go to most recent revision | Compare with Previous | Blame | View Log

// Valid __thread specifiers.
// { dg-require-effective-target tls }

__thread int g1;
extern __thread int g2;
static __thread int g3;

void foo()
{
  extern __thread int l1;
  static __thread int l2;
}

struct A {
  static __thread int i;
};

__thread int A::i = 42;

template <typename T> struct B {
  static __thread T t;
};

template <typename T>
__thread T B<T>::t = 42;

void bar ()
{
  int j = B<int>::t;
  int k = B<const int>::t;
}

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.