From: Thomas Schwinge <tho...@codesourcery.com> For easier maintenance.
gcc/testsuite/ * gfortran.dg/goacc/assumed.f95: Use relative line numbers for a few DejaGnu directives. * gfortran.dg/goacc/list.f95: Likewise. * gfortran.dg/goacc/loop-1-2.f95: Likewise. * gfortran.dg/goacc/loop-1.f95: Likewise. * gfortran.dg/goacc/reduction.f95: Likewise. --- gcc/testsuite/gfortran.dg/goacc/assumed.f95 | 5 +-- gcc/testsuite/gfortran.dg/goacc/list.f95 | 8 ++-- gcc/testsuite/gfortran.dg/goacc/loop-1-2.f95 | 2 +- gcc/testsuite/gfortran.dg/goacc/loop-1.f95 | 2 +- gcc/testsuite/gfortran.dg/goacc/reduction.f95 | 45 +++++++++---------- 5 files changed, 30 insertions(+), 32 deletions(-) diff --git a/gcc/testsuite/gfortran.dg/goacc/assumed.f95 b/gcc/testsuite/gfortran.dg/goacc/assumed.f95 index 4efe5a2b06e..4e35c1d5960 100644 --- a/gcc/testsuite/gfortran.dg/goacc/assumed.f95 +++ b/gcc/testsuite/gfortran.dg/goacc/assumed.f95 @@ -16,6 +16,7 @@ contains !$acc host_data use_device (a) ! { dg-error "Assumed size" } !$acc end host_data !$acc parallel loop reduction(+:a) ! { dg-error "Assumed size" } + ! { dg-error "Array 'a' is not permitted in reduction" "" { target "*-*-*" } .-1 } do i = 1,5 enddo !$acc end parallel loop @@ -37,6 +38,7 @@ contains !$acc host_data use_device (a) ! { dg-error "Assumed rank" } !$acc end host_data !$acc parallel loop reduction(+:a) ! { dg-error "Assumed rank" } + ! { dg-error "Array 'a' is not permitted in reduction" "" { target "*-*-*" } .-1 } do i = 1,5 enddo !$acc end parallel loop @@ -45,6 +47,3 @@ contains !$acc update self (a) ! { dg-error "Assumed rank" } end subroutine assumed_rank end module test - -! { dg-error "Array 'a' is not permitted in reduction" "" { target "*-*-*" } 18 } -! { dg-error "Array 'a' is not permitted in reduction" "" { target "*-*-*" } 39 } diff --git a/gcc/testsuite/gfortran.dg/goacc/list.f95 b/gcc/testsuite/gfortran.dg/goacc/list.f95 index d2f4c5e88be..3d4ebf88720 100644 --- a/gcc/testsuite/gfortran.dg/goacc/list.f95 +++ b/gcc/testsuite/gfortran.dg/goacc/list.f95 @@ -100,14 +100,14 @@ program test !$acc host_data use_device(10) ! { dg-error "Syntax error" } !$acc host_data use_device(/b/, /b/) + ! { dg-error "neither a POINTER nor an array" "" { target *-*-* } .-1 } + ! { dg-error "present on multiple clauses" "" { target *-*-* } .-2 } !$acc end host_data - ! { dg-error "neither a POINTER nor an array" "" { target *-*-* } 102 } - ! { dg-error "present on multiple clauses" "" { target *-*-* } 102 } !$acc host_data use_device(i, j, i) + ! { dg-error "neither a POINTER nor an array" "" { target *-*-* } .-1 } + ! { dg-error "present on multiple clauses" "" { target *-*-* } .-2 } !$acc end host_data - ! { dg-error "neither a POINTER nor an array" "" { target *-*-* } 107 } - ! { dg-error "present on multiple clauses" "" { target *-*-* } 107 } !$acc host_data use_device(p1) !$acc end host_data diff --git a/gcc/testsuite/gfortran.dg/goacc/loop-1-2.f95 b/gcc/testsuite/gfortran.dg/goacc/loop-1-2.f95 index e048205d2c3..8846e7d2a1f 100644 --- a/gcc/testsuite/gfortran.dg/goacc/loop-1-2.f95 +++ b/gcc/testsuite/gfortran.dg/goacc/loop-1-2.f95 @@ -148,8 +148,8 @@ subroutine test1 !$acc parallel loop collapse(2) do i = 1, 3 do r = 4, 6 + ! { dg-error "ACC LOOP iteration variable must be of type integer" "" { target *-*-* } .-1 } end do - ! { dg-error "ACC LOOP iteration variable must be of type integer" "" { target *-*-* } 150 } end do !$acc loop independent seq diff --git a/gcc/testsuite/gfortran.dg/goacc/loop-1.f95 b/gcc/testsuite/gfortran.dg/goacc/loop-1.f95 index 776fa482af3..67dc97a3ecd 100644 --- a/gcc/testsuite/gfortran.dg/goacc/loop-1.f95 +++ b/gcc/testsuite/gfortran.dg/goacc/loop-1.f95 @@ -148,8 +148,8 @@ subroutine test1 !$acc parallel loop collapse(2) do i = 1, 3 do r = 4, 6 + ! { dg-error "ACC LOOP iteration variable must be of type integer" "" { target *-*-* } .-1 } end do - ! { dg-error "ACC LOOP iteration variable must be of type integer" "" { target *-*-* } 150 } end do !$acc loop independent seq diff --git a/gcc/testsuite/gfortran.dg/goacc/reduction.f95 b/gcc/testsuite/gfortran.dg/goacc/reduction.f95 index a13574b150c..aaa82980e16 100644 --- a/gcc/testsuite/gfortran.dg/goacc/reduction.f95 +++ b/gcc/testsuite/gfortran.dg/goacc/reduction.f95 @@ -25,14 +25,19 @@ save i2 common /blk/ i1 !$acc parallel reduction (+:ia2) +! { dg-error "Array 'ia2' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (+:ra1) +! { dg-error "Array 'ra1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (+:ca1) +! { dg-error "Array 'ca1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (+:da1) +! { dg-error "Array 'da1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (.and.:la1) +! { dg-error "Array 'la1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (+:i3, r1, d1, c1) !$acc end parallel @@ -63,99 +68,93 @@ common /blk/ i1 !$acc parallel reduction (*:p1) ! { dg-error "POINTER object" } !$acc end parallel !$acc parallel reduction (-:aa1) +! { dg-error "Array 'aa1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (*:ia1) ! { dg-error "Assumed size" } +! { dg-error "Array 'ia1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (+:l1) ! { dg-error "OMP DECLARE REDUCTION \\+ not found for type LOGICAL" } !$acc end parallel !$acc parallel reduction (*:la1) ! { dg-error "OMP DECLARE REDUCTION \\* not found for type LOGICAL" } +! { dg-error "Array 'la1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (-:a1) ! { dg-error "OMP DECLARE REDUCTION - not found for type CHARACTER" } !$acc end parallel !$acc parallel reduction (+:t1) ! { dg-error "OMP DECLARE REDUCTION \\+ not found for type TYPE" } !$acc end parallel !$acc parallel reduction (*:ta1) ! { dg-error "OMP DECLARE REDUCTION \\* not found for type TYPE" } +! { dg-error "Array 'ta1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (.and.:i3) ! { dg-error "OMP DECLARE REDUCTION \\.and\\. not found for type INTEGER" } !$acc end parallel !$acc parallel reduction (.or.:ia2) ! { dg-error "OMP DECLARE REDUCTION \\.or\\. not found for type INTEGER" } +! { dg-error "Array 'ia2' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (.eqv.:r1) ! { dg-error "OMP DECLARE REDUCTION \\.eqv\\. not found for type REAL" } !$acc end parallel !$acc parallel reduction (.neqv.:ra1) ! { dg-error "OMP DECLARE REDUCTION \\.neqv\\. not found for type REAL" } +! { dg-error "Array 'ra1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (.and.:d1) ! { dg-error "OMP DECLARE REDUCTION \\.and\\. not found for type REAL" } !$acc end parallel !$acc parallel reduction (.or.:da1) ! { dg-error "OMP DECLARE REDUCTION \\.or\\. not found for type REAL" } +! { dg-error "Array 'da1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (.eqv.:c1) ! { dg-error "OMP DECLARE REDUCTION \\.eqv\\. not found for type COMPLEX" } !$acc end parallel !$acc parallel reduction (.neqv.:ca1) ! { dg-error "OMP DECLARE REDUCTION \\.neqv\\. not found for type COMPLEX" } +! { dg-error "Array 'ca1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (.and.:a1) ! { dg-error "OMP DECLARE REDUCTION \\.and\\. not found for type CHARACTER" } !$acc end parallel !$acc parallel reduction (.or.:t1) ! { dg-error "OMP DECLARE REDUCTION \\.or\\. not found for type TYPE" } !$acc end parallel !$acc parallel reduction (.eqv.:ta1) ! { dg-error "OMP DECLARE REDUCTION \\.eqv\\. not found for type TYPE" } +! { dg-error "Array 'ta1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (min:c1) ! { dg-error "OMP DECLARE REDUCTION min not found for type COMPLEX" } !$acc end parallel !$acc parallel reduction (max:ca1) ! { dg-error "OMP DECLARE REDUCTION max not found for type COMPLEX" } +! { dg-error "Array 'ca1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (max:l1) ! { dg-error "OMP DECLARE REDUCTION max not found for type LOGICAL" } !$acc end parallel !$acc parallel reduction (min:la1) ! { dg-error "OMP DECLARE REDUCTION min not found for type LOGICAL" } +! { dg-error "Array 'la1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (max:a1) ! { dg-error "OMP DECLARE REDUCTION max not found for type CHARACTER" } !$acc end parallel !$acc parallel reduction (min:t1) ! { dg-error "OMP DECLARE REDUCTION min not found for type TYPE" } !$acc end parallel !$acc parallel reduction (max:ta1) ! { dg-error "OMP DECLARE REDUCTION max not found for type TYPE" } +! { dg-error "Array 'ta1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (iand:r1) ! { dg-error "OMP DECLARE REDUCTION iand not found for type REAL" } !$acc end parallel !$acc parallel reduction (ior:ra1) ! { dg-error "OMP DECLARE REDUCTION ior not found for type REAL" } +! { dg-error "Array 'ra1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (ieor:d1) ! { dg-error "OMP DECLARE REDUCTION ieor not found for type REAL" } !$acc end parallel !$acc parallel reduction (ior:da1) ! { dg-error "OMP DECLARE REDUCTION ior not found for type REAL" } +! { dg-error "Array 'da1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (iand:c1) ! { dg-error "OMP DECLARE REDUCTION iand not found for type COMPLEX" } !$acc end parallel !$acc parallel reduction (ior:ca1) ! { dg-error "OMP DECLARE REDUCTION ior not found for type COMPLEX" } +! { dg-error "Array 'ca1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (ieor:l1) ! { dg-error "OMP DECLARE REDUCTION ieor not found for type LOGICAL" } !$acc end parallel !$acc parallel reduction (iand:la1) ! { dg-error "OMP DECLARE REDUCTION iand not found for type LOGICAL" } +! { dg-error "Array 'la1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel !$acc parallel reduction (ior:a1) ! { dg-error "OMP DECLARE REDUCTION ior not found for type CHARACTER" } !$acc end parallel !$acc parallel reduction (ieor:t1) ! { dg-error "OMP DECLARE REDUCTION ieor not found for type TYPE" } !$acc end parallel !$acc parallel reduction (iand:ta1) ! { dg-error "OMP DECLARE REDUCTION iand not found for type TYPE" } +! { dg-error "Array 'ta1' is not permitted in reduction" "" { target "*-*-*" } .-1 } !$acc end parallel end subroutine - -! { dg-error "Array 'ia2' is not permitted in reduction" "" { target "*-*-*" } 27 } -! { dg-error "Array 'ra1' is not permitted in reduction" "" { target "*-*-*" } 29 } -! { dg-error "Array 'ca1' is not permitted in reduction" "" { target "*-*-*" } 31 } -! { dg-error "Array 'da1' is not permitted in reduction" "" { target "*-*-*" } 33 } -! { dg-error "Array 'la1' is not permitted in reduction" "" { target "*-*-*" } 35 } -! { dg-error "Array 'aa1' is not permitted in reduction" "" { target "*-*-*" } 65 } -! { dg-error "Array 'ia1' is not permitted in reduction" "" { target "*-*-*" } 67 } -! { dg-error "Array 'la1' is not permitted in reduction" "" { target "*-*-*" } 71 } -! { dg-error "Array 'ta1' is not permitted in reduction" "" { target "*-*-*" } 77 } -! { dg-error "Array 'ia2' is not permitted in reduction" "" { target "*-*-*" } 81 } -! { dg-error "Array 'ra1' is not permitted in reduction" "" { target "*-*-*" } 85 } -! { dg-error "Array 'da1' is not permitted in reduction" "" { target "*-*-*" } 89 } -! { dg-error "Array 'ca1' is not permitted in reduction" "" { target "*-*-*" } 93 } -! { dg-error "Array 'ta1' is not permitted in reduction" "" { target "*-*-*" } 99 } -! { dg-error "Array 'ca1' is not permitted in reduction" "" { target "*-*-*" } 103 } -! { dg-error "Array 'la1' is not permitted in reduction" "" { target "*-*-*" } 107 } -! { dg-error "Array 'ta1' is not permitted in reduction" "" { target "*-*-*" } 113 } -! { dg-error "Array 'ra1' is not permitted in reduction" "" { target "*-*-*" } 117 } -! { dg-error "Array 'da1' is not permitted in reduction" "" { target "*-*-*" } 121 } -! { dg-error "Array 'ca1' is not permitted in reduction" "" { target "*-*-*" } 125 } -! { dg-error "Array 'la1' is not permitted in reduction" "" { target "*-*-*" } 129 } -! { dg-error "Array 'ta1' is not permitted in reduction" "" { target "*-*-*" } 135 } -- 2.34.1