mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-02 18:53:22 +00:00
29 lines
237 B
C
29 lines
237 B
C
// { dg-require-alias }
|
|
|
|
extern "C" void abort();
|
|
|
|
struct A
|
|
{
|
|
A();
|
|
int i;
|
|
};
|
|
|
|
extern A a;
|
|
#pragma omp threadprivate (a)
|
|
A a;
|
|
|
|
A &f()
|
|
{
|
|
return a;
|
|
}
|
|
|
|
int j;
|
|
A::A(): i(j) { }
|
|
|
|
int main()
|
|
{
|
|
j = 42;
|
|
if (f().i != 42)
|
|
abort ();
|
|
}
|