summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.30.1.f90
blob: e62cbf81bbcac12045706ab4ff439878e21ed81a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
! { dg-do compile }

      SUBROUTINE A30(N, A, B)
       INTEGER N
       REAL A(*), B(*)
        INTEGER I
!$OMP PARALLEL
!$OMP DO LASTPRIVATE(I)
        DO I=1,N-1
          A(I) = B(I) + B(I+1)
        ENDDO
!$OMP END PARALLEL
        A(I) = B(I)      ! I has the value of N here
      END SUBROUTINE A30