Replace absolute linenrs in gfortran.dg

2017-04-28  Tom de Vries  <tom@codesourcery.com>

	PR testsuite/80557
	* gfortran.dg/gomp/appendix-a/a.24.1.f90: Replace absolute linenrs.
	* gfortran.dg/gomp/appendix-a/a.31.3.f90: Same.

From-SVN: r247400
This commit is contained in:
Tom de Vries 2017-04-28 21:52:16 +00:00 committed by Tom de Vries
parent b5be38bc30
commit c961093393
3 changed files with 21 additions and 17 deletions

View File

@ -1,3 +1,9 @@
2017-04-28 Tom de Vries <tom@codesourcery.com>
PR testsuite/80557
* gfortran.dg/gomp/appendix-a/a.24.1.f90: Replace absolute linenrs.
* gfortran.dg/gomp/appendix-a/a.31.3.f90: Same.
2017-04-28 Tom de Vries <tom@codesourcery.com>
PR testsuite/80557

View File

@ -11,7 +11,7 @@
!$OMP THREADPRIVATE(/BLOCKX/)
INTEGER I, J
i=1
!$OMP PARALLEL DEFAULT(NONE) PRIVATE(A) SHARED(Z) PRIVATE(J)
!$OMP PARALLEL DEFAULT(NONE) PRIVATE(A) SHARED(Z) PRIVATE(J) ! { dg-line omp_parallel }
J = OMP_GET_NUM_THREADS();
! O.K. - J is listed in PRIVATE clause
A = Z(J) ! O.K. - A is listed in PRIVATE clause
@ -19,8 +19,8 @@
X=1 ! O.K. - X is THREADPRIVATE
Z(I) = Y ! Error - cannot reference I or Y here
! { dg-error "'i' not specified" "" { target *-*-* } .-1 } */
! { dg-error "enclosing 'parallel'" "" { target *-*-* } 14 } */
! { dg-error "'y' not specified" "" { target *-*-* } 20 } */
! { dg-error "enclosing 'parallel'" "" { target *-*-* } omp_parallel } */
! { dg-error "'y' not specified" "" { target *-*-* } .-3 } */
!$OMP DO firstprivate(y)
DO I = 1,10
Z(I) = Y ! O.K. - I is the loop iteration variable

View File

@ -1,15 +1,13 @@
! { dg-do compile }
PROGRAM A31_3_WRONG
MAX = HUGE(0)
M=0
!$OMP PARALLEL DO REDUCTION(MAX: M) ! MAX is no longer the
! intrinsic so this
! is non-conforming
! { dg-error "OMP DECLARE REDUCTION max not found" "" { target *-*-* } 5 } */
DO I = 1, 100
CALL SUB(M,I)
END DO
END PROGRAM A31_3_WRONG
SUBROUTINE SUB(M,I)
M = MAX(M,I)
END SUBROUTINE SUB
PROGRAM A31_3_WRONG
MAX = HUGE(0)
M=0
!$OMP PARALLEL DO REDUCTION(MAX: M) ! MAX is no longer the intrinsic so this is non-conforming
! { dg-error "OMP DECLARE REDUCTION max not found" "" { target *-*-* } .-1 } */
DO I = 1, 100
CALL SUB(M,I)
END DO
END PROGRAM A31_3_WRONG
SUBROUTINE SUB(M,I)
M = MAX(M,I)
END SUBROUTINE SUB