view libgomp/testsuite/libgomp.c/loop-3.c @ 51:ae3a4bfb450b

add some files of version 4.4.3 that have been forgotten.
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Sun, 07 Feb 2010 18:27:48 +0900
parents a06113de4d67
children
line wrap: on
line source

/* { 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;
}