summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.8.1.f90
blob: f499e7f8979fe849f59e947ade6b7eeba44d03aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! { dg-do compile }
      SUBROUTINE A8(N, M, A, B, Y, Z)
         INTEGER N, M
         REAL A(*), B(*), Y(*), Z(*)
         INTEGER I
!$OMP PARALLEL
!$OMP DO
         DO I=2,N
           B(I) = (A(I) + A(I-1)) / 2.0
         ENDDO
!$OMP END DO NOWAIT
!$OMP DO
         DO I=1,M
           Y(I) = SQRT(Z(I))
         ENDDO
!$OMP END DO NOWAIT
!$OMP END PARALLEL
      END SUBROUTINE A8