ca2b131143
* gimplify.c (omp_is_private): Don't return true if decl is not already private on #pragma omp for or #pragma omp parallel for. * gcc.dg/gomp/pr27388-3.c: Adjust dg-final. * testsuite/libgomp.c/loop-10.c: New test. * libgomp.c/loop-3.c (main): Add lastprivate clause. * libgomp.c++/loop-6.C (main): Likewise. From-SVN: r137199
26 lines
302 B
C
26 lines
302 B
C
/* { dg-do run } */
|
|
|
|
extern void abort (void);
|
|
|
|
volatile int count;
|
|
static int test(void)
|
|
{
|
|
return ++count > 0;
|
|
}
|
|
|
|
int i;
|
|
|
|
int main()
|
|
{
|
|
#pragma omp for lastprivate (i)
|
|
for (i = 0; i < 10; ++i)
|
|
{
|
|
if (test())
|
|
continue;
|
|
abort ();
|
|
}
|
|
if (i != count)
|
|
abort ();
|
|
return 0;
|
|
}
|