repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
gcc/
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.c
/
cancel-for-1.c
blob
f805f13642f547c20e9c68b802d02e199d0ffabe
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
}