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 target/82855
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.c
/
nestedfn-5.c
blob
651ce7cf5768a41b2cc679ba0e5b07d43994f69a
1
/* { dg-do run } */
2
3
extern
void
abort
(
void
);
4
5
void
6
foo
(
int
*
j
)
7
{
8
int
i
=
5
;
9
int
bar
(
void
) {
return
i
+
1
; }
10
#pragma omp sections
11
{
12
#pragma omp section
13
{
14
if
(
bar
() !=
6
)
15
#pragma omp atomic
16
++*
j
;
17
}
18
#pragma omp section
19
{
20
if
(
bar
() !=
6
)
21
#pragma omp atomic
22
++*
j
;
23
}
24
}
25
}
26
27
int
28
main
(
void
)
29
{
30
int
j
=
0
;
31
#pragma omp parallel num_threads (2)
32
foo
(&
j
);
33
if
(
j
)
34
abort
();
35
return
0
;
36
}
37