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
PR middle-end/66133
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.c
/
pr66133.c
blob
e98e5aac4129d025a38269c3a5c1bcc8ccfe0444
1
/* PR middle-end/66133 */
2
/* { dg-do run } */
3
/* { dg-options "-O2 -fopenmp" } */
4
5
#include <stdlib.h>
6
#include <unistd.h>
7
8
volatile
int
x
;
9
10
__attribute__
((
noinline
))
void
11
foo
(
void
)
12
{
13
if
(
x
==
0
)
14
{
15
#pragma omp task
16
{
17
usleep
(
2000
);
18
exit
(
0
);
19
}
20
}
21
else
22
abort
();
23
}
24
25
int
26
main
()
27
{
28
#pragma omp parallel num_threads (2)
29
{
30
#pragma omp barrier
31
#pragma omp single
32
foo
();
33
}
34
exit
(
0
);
35
}