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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [gomp/] [appendix-a/] [a.26.2.c] - Rev 689

Compare with Previous | Blame | View Log

/* { dg-do compile } */
/* { dg-options "-fopenmp -std=c99" } */
 
int a;
void
g (int k)
{
  a = k;			/* The global "a", not the private "a" in f */
}
 
void
f (int n)
{
  int a = 0;
#pragma omp parallel for private(a)
  for (int i = 1; i < n; i++)
    {
      a = i;
      g (a * 2);		/* Private copy of "a" */
    }
}
 

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.