OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [gomp/] [appendix-a/] [a.26.2.c] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-fopenmp -std=c99" } */
3
 
4
int a;
5
void
6
g (int k)
7
{
8
  a = k;                        /* The global "a", not the private "a" in f */
9
}
10
 
11
void
12
f (int n)
13
{
14
  int a = 0;
15
#pragma omp parallel for private(a)
16
  for (int i = 1; i < n; i++)
17
    {
18
      a = i;
19
      g (a * 2);                /* Private copy of "a" */
20
    }
21
}

powered by: WebSVN 2.1.0

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