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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgomp/] [testsuite/] [libgomp.c/] [reduction-6.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
/* { dg-do run } */
2
 
3
extern void abort (void);
4
int j;
5
float f;
6
 
7
int
8
main ()
9
{
10
  j = -10000;
11
  f = 1024.0;
12
  int i;
13
  #pragma omp parallel for reduction (min:f) reduction (max:j)
14
    for (i = 0; i < 4; i++)
15
      switch (i)
16
        {
17
        case 0:
18
          if (j < -16) j = -16; break;
19
        case 1:
20
          if (f > -2.0) f = -2.0; break;
21
        case 2:
22
          if (j < 8) j = 8; if (f > 9.0) f = 9.0; break;
23
        case 3:
24
          break;
25
        }
26
  if (j != 8 || f != -2.0)
27
    abort ();
28
  return 0;
29
}

powered by: WebSVN 2.1.0

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