| 1 |
! { dg-do run } |
| 2 |
|
| 3 |
module m |
| 4 |
integer a |
| 5 |
end module m |
| 6 |
|
| 7 |
program main |
| 8 |
use omp_lib |
| 9 |
use m |
| 10 |
implicit none |
| 11 |
|
| 12 |
!$omp task final (.true.) |
| 13 |
if (.not. omp_in_final ()) & |
| 14 |
error stop |
| 15 |
!$omp task |
| 16 |
if (.not. omp_in_final ()) & |
| 17 |
error stop |
| 18 |
!$omp taskgroup task_reduction (+: a) |
| 19 |
if (.not. omp_in_final ()) & |
| 20 |
error stop |
| 21 |
!$omp task in_reduction (+: a) |
| 22 |
a = a + 1 |
| 23 |
if (.not. omp_in_final ()) & |
| 24 |
error stop |
| 25 |
!$omp end task |
| 26 |
!$omp end taskgroup |
| 27 |
if (.not. omp_in_final ()) & |
| 28 |
error stop |
| 29 |
!$omp taskwait |
| 30 |
!$omp end task |
| 31 |
!$omp end task |
| 32 |
end |