211b7533bf
PR middle-end/90779 * gimplify.c: Include omp-offload.h and context.h. (gimplify_bind_expr): Add "omp declare target" attributes to static block scope variables inside of target region or target functions. * c-c++-common/goacc/routine-5.c (func2): Don't expect error for static block scope variable in #pragma acc routine. * testsuite/libgomp.c/pr90779.c: New test. * testsuite/libgomp.fortran/pr90779.f90: New test. From-SVN: r272322
19 lines
235 B
C
19 lines
235 B
C
/* PR middle-end/90779 */
|
|
|
|
extern void abort (void);
|
|
|
|
int
|
|
main ()
|
|
{
|
|
int i, j;
|
|
for (i = 0; i < 2; ++i)
|
|
#pragma omp target map(from: j)
|
|
{
|
|
static int k = 5;
|
|
j = ++k;
|
|
}
|
|
if (j != 7)
|
|
abort ();
|
|
return 0;
|
|
}
|