projects
/
gcc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Load new scanlang.exp
[gcc.git]
/
libgomp
/
testsuite
/
libgomp.c
/
pr35549.c
1
/* PR middle-end/35549 */
2
/* { dg-do run } */
3
4
#include <omp.h>
5
#include <stdlib.h>
6
7
int
8
main
(
void
)
9
{
10
int
i
=
6
,
n
=
0
;
11
omp_set_dynamic
(
0
);
12
omp_set_nested
(
1
);
13
#pragma omp parallel shared (i) num_threads (3)
14
{
15
if
(
omp_get_num_threads
() !=
3
)
16
#pragma omp atomic
17
n
+=
1
;
18
#pragma omp parallel shared (i) num_threads (4)
19
{
20
if
(
omp_get_num_threads
() !=
4
)
21
#pragma omp atomic
22
n
+=
1
;
23
#pragma omp critical
24
i
+=
1
;
25
}
26
}
27
if
(
n
==
0
&&
i
!=
6
+
3
*
4
)
28
abort
();
29
return
0
;
30
}