Fix wrong assertion for LIPO
[official-gcc.git] / gcc-4_7-mobile / libgomp / testsuite / libgomp.fortran / pr25162.f
bloba868ea4c9b2c64e627744b5fc15f88d5dba5ac2b
1 C PR fortran/25162
2 C { dg-do run }
3 C { dg-require-effective-target tls_runtime }
4 PROGRAM PR25162
5 CALL TEST1
6 CALL TEST2
7 END
8 SUBROUTINE TEST1
9 DOUBLE PRECISION BPRIM
10 COMMON /TESTCOM/ BPRIM(100)
11 C$OMP THREADPRIVATE(/TESTCOM/)
12 INTEGER I
13 DO I = 1, 100
14 BPRIM( I ) = DBLE( I )
15 END DO
16 RETURN
17 END
18 SUBROUTINE TEST2
19 DOUBLE PRECISION BPRIM
20 COMMON /TESTCOM/ BPRIM(100)
21 C$OMP THREADPRIVATE(/TESTCOM/)
22 INTEGER I, IDUM(50)
23 DO I = 1, 50
24 IDUM(I) = I
25 END DO
26 C$OMP PARALLEL COPYIN(/TESTCOM/) NUM_THREADS(4)
27 CALL TEST3
28 C$OMP END PARALLEL
29 RETURN
30 END
31 SUBROUTINE TEST3
32 DOUBLE PRECISION BPRIM
33 COMMON /TESTCOM/ BPRIM(100)
34 C$OMP THREADPRIVATE(/TESTCOM/)
35 INTEGER K
36 DO K = 1, 10
37 IF (K.NE.BPRIM(K)) CALL ABORT
38 END DO
39 RETURN
40 END