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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgomp/] [testsuite/] [libgomp.c/] [pr49897-1.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 735 jeremybenn
/* PR middle-end/49897 */
2
/* { dg-do run } */
3
 
4
extern void abort (void);
5
 
6
int
7
main ()
8
{
9
  int i, j, x = 0, y, sum = 0;
10
#pragma omp parallel reduction(+:sum)
11
  {
12
  #pragma omp for firstprivate(x) lastprivate(x, y)
13
    for (i = 0; i < 10; i++)
14
      {
15
        x = i;
16
        y = 0;
17
      #pragma omp parallel reduction(+:sum)
18
        {
19
        #pragma omp for firstprivate(y) lastprivate(y)
20
          for (j = 0; j < 10; j++)
21
            {
22
              y = j;
23
              sum += y;
24
            }
25
        }
26
      }
27
  }
28
  if (x != 9 || y != 9 || sum != 450)
29
    abort ();
30
  return 0;
31
}

powered by: WebSVN 2.1.0

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