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

Subversion Repositories openrisc

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

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 for reduction(+:sum) firstprivate(x) lastprivate(x, y)
11
  for (i = 0; i < 10; i++)
12
    {
13
      x = i;
14
      y = 0;
15
    #pragma omp parallel for reduction(+:sum) firstprivate(y) lastprivate(y)
16
      for (j = 0; j < 10; j++)
17
        {
18
          y = j;
19
          sum += y;
20
        }
21
    }
22
  if (x != 9 || y != 9 || sum != 450)
23
    abort ();
24
  return 0;
25
}

powered by: WebSVN 2.1.0

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