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
Merge from trunk
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
gomp
/
pr59467.f90
blob
e69c9eb49a02fbf3cdd45ce144bba8fa32e4e4e5
1
! PR libgomp/59467
2
! { dg-do compile }
3
! { dg-options "-fopenmp" }
4
FUNCTION
t
()
5
INTEGER
::
a
,
b
,
t
6
a
=
0
7
b
=
0
8
!$OMP PARALLEL REDUCTION(+:b)
9
!$OMP SINGLE ! { dg-error "is not threadprivate or private in outer context" }
10
!$OMP ATOMIC WRITE
11
a
=
6
12
!$OMP END SINGLE COPYPRIVATE (a)
13
b
=
a
14
!$OMP END PARALLEL
15
t
=
b
16
b
=
0
17
!$OMP PARALLEL REDUCTION(+:b)
18
!$OMP SINGLE
19
!$OMP ATOMIC WRITE
20
b
=
6
21
!$OMP END SINGLE COPYPRIVATE (b)
22
!$OMP END PARALLEL
23
t
=
t
+
b
24
END FUNCTION