OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [libgomp/] [testsuite/] [libgomp.c/] [loop-10.c] - Rev 856

Go to most recent revision | Compare with Previous | Blame | View Log

extern void abort (void);
 
int i = 8;
 
int main (void)
{
  int j = 7, k = 0;
  #pragma omp for
  for (i = 0; i < 10; i++)
    ;
  #pragma omp for
  for (j = 0; j < 10; j++)
    ;
  /* OpenMP 3.0 newly guarantees that the original list items can't
     be shared with the privatized omp for iterators, even when
     the original list items are already private.  */
  if (i != 8 || j != 7)
    abort ();
  #pragma omp parallel private (i) reduction (+:k)
  {
    i = 6;
    #pragma omp for
    for (i = 0; i < 10; i++)
      ;
    k = (i != 6);
  }
  if (k)
    abort ();
  return 0;
}
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.