Mercurial > hg > CbC > CbC_gcc
comparison libgomp/testsuite/libgomp.c/reduction-6.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* { 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 } |