Retro68/gcc/libgomp/testsuite/libgomp.hsa.c/staticvar.c
2018-12-28 16:30:48 +01:00

24 lines
257 B
C

extern void abort (void);
#pragma omp declare target
int
foo (void)
{
static int s;
return ++s;
}
#pragma omp end declare target
int
main ()
{
int r;
#pragma omp target map(from:r)
{
r = foo ();
}
if (r != 1)
abort ();
return 0;
}