Mercurial > hg > CbC > CbC_gcc
annotate libgomp/testsuite/libgomp.c/cancel-for-1.c @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do run } */ |
2 /* { dg-set-target-env-var OMP_CANCELLATION "true" } */ | |
3 | |
4 #include <stdlib.h> | |
5 #include <omp.h> | |
6 | |
7 int | |
8 main () | |
9 { | |
10 #pragma omp parallel num_threads (32) | |
11 { | |
12 int i; | |
13 #pragma omp for | |
14 for (i = 0; i < 1000; ++i) | |
15 { | |
16 #pragma omp cancel for | |
17 if (omp_get_cancellation ()) | |
18 abort (); | |
19 } | |
20 } | |
21 return 0; | |
22 } |