OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [gomp/] [appendix-a/] [a.24.1.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-require-effective-target tls }
3
 
4
      SUBROUTINE A24(A)
5
      INTEGER A
6
      INTEGER X, Y, Z(1000)
7
      INTEGER OMP_GET_NUM_THREADS
8
      COMMON/BLOCKX/X
9
      COMMON/BLOCKY/Y
10
      COMMON/BLOCKZ/Z
11
!$OMP THREADPRIVATE(/BLOCKX/)
12
      INTEGER I, J
13
      i=1
14
!$OMP PARALLEL DEFAULT(NONE) PRIVATE(A) SHARED(Z) PRIVATE(J)
15
      J = OMP_GET_NUM_THREADS();
16
               ! O.K. - J is listed in PRIVATE clause
17
      A = Z(J) ! O.K. - A is listed in PRIVATE clause
18
               !       - Z is listed in SHARED clause
19
      X=1      ! O.K. - X is THREADPRIVATE
20
      Z(I) = Y ! Error - cannot reference I or Y here
21
! { dg-error "'i' not specified" "" { target *-*-* } 20 } */
22
! { dg-error "enclosing parallel" "" { target *-*-* } 14 } */
23
! { dg-error "'y' not specified" "" { target *-*-* } 20 }  */
24
!$OMP DO firstprivate(y)
25
      DO I = 1,10
26
        Z(I) = Y ! O.K. - I is the loop iteration variable
27
                 ! Y is listed in FIRSTPRIVATE clause
28
      END DO
29
      Z(I) = Y    ! Error - cannot reference I or Y here
30
!$OMP END PARALLEL
31
      END SUBROUTINE A24

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.