URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// { dg-do run }
|
// { dg-do run }
|
// { dg-options "-O2" }
|
// { dg-options "-O2" }
|
// { dg-additional-sources "static-1a.cc" }
|
// { dg-additional-sources "static-1a.cc" }
|
// { dg-require-effective-target tls_runtime }
|
// { dg-require-effective-target tls_runtime }
|
|
|
extern "C" void abort ();
|
extern "C" void abort ();
|
extern int test ();
|
extern int test ();
|
|
|
struct A
|
struct A
|
{
|
{
|
static __thread int i;
|
static __thread int i;
|
};
|
};
|
|
|
__thread int A::i = 8;
|
__thread int A::i = 8;
|
|
|
int
|
int
|
main ()
|
main ()
|
{
|
{
|
if (A::i != 8)
|
if (A::i != 8)
|
abort ();
|
abort ();
|
|
|
if (test ())
|
if (test ())
|
abort ();
|
abort ();
|
|
|
if (A::i != 17)
|
if (A::i != 17)
|
abort ();
|
abort ();
|
|
|
return 0;
|
return 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.