view libgomp/testsuite/libgomp.c/loop-3.c @ 45:d645ac0f55d6

add instration howto for PS3 to CbC-INSTALL.
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Fri, 29 Jan 2010 12:18:08 +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;
}