From: Tom de Vries Date: Fri, 28 Apr 2017 21:52:16 +0000 (+0000) Subject: Replace absolute linenrs in gfortran.dg X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c961093393e427bce36172d6b3d0348af403cd96;p=gcc.git Replace absolute linenrs in gfortran.dg 2017-04-28 Tom de Vries 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 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 589da6df3d1..3e1b9959c70 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2017-04-28 Tom de Vries + + 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 PR testsuite/80557 diff --git a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.24.1.f90 b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.24.1.f90 index 802577bbe0b..52a2cbb82da 100644 --- a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.24.1.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.24.1.f90 @@ -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 diff --git a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.31.3.f90 b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.31.3.f90 index 598c904206e..7de656a37f8 100644 --- a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.31.3.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.31.3.f90 @@ -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