]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[OpenACC/Fortran testsuite] Use relative line numbers for a few DejaGnu directives
authorThomas Schwinge <thomas@codesourcery.com>
Fri, 8 Nov 2019 13:03:06 +0000 (14:03 +0100)
committerThomas Schwinge <tschwinge@baylibre.com>
Thu, 16 Jan 2025 11:49:32 +0000 (12:49 +0100)
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
gcc/testsuite/gfortran.dg/goacc/list.f95
gcc/testsuite/gfortran.dg/goacc/loop-1-2.f95
gcc/testsuite/gfortran.dg/goacc/loop-1.f95
gcc/testsuite/gfortran.dg/goacc/reduction.f95

index 4efe5a2b06ec3afcbab831a5cfce5bce6d4f5852..4e35c1d596008168ac5c74af1acdd243997881db 100644 (file)
@@ -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 }
index d2f4c5e88be2624f99ce1006aad568dd45e595f0..3d4ebf88720e860c570b1c661952b3bfe96a804e 100644 (file)
@@ -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
index e048205d2c3892b5b13a178ddd1c8d7d87754b50..8846e7d2a1f8fbd913442e3c462fd566d8f89f67 100644 (file)
@@ -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
index 776fa482af3cb59ba3d5f28f475111a28edadb23..67dc97a3ecdd2bc842c9f6bb5d132c13a10c5496 100644 (file)
@@ -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
index a13574b150c715f7c7b7cebebb7835b055a66b60..aaa82980e16dea25c7a8d202f4b65f0f53213c1e 100644 (file)
@@ -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 }