gfortran: Rely on dg-do-what-default to avoid running pr85853.f90, pr107254.f90 and vect-alias-check-1.F90 on non-vector targets

Message ID 20231102190911.66763-1-patrick@rivosinc.com
State Accepted
Headers
Series gfortran: Rely on dg-do-what-default to avoid running pr85853.f90, pr107254.f90 and vect-alias-check-1.F90 on non-vector targets |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Patrick O'Neill Nov. 2, 2023, 7:09 p.m. UTC
  Testcases in gfortran.dg/vect/vect.exp rely on
check_vect_support_and_set_flags to set dg-do-what-default and avoid
running vector tests on non-vector targets. The three testcases in this
patch overwrite the default with dg-do run which causes issues
for non-vector targets.

Removing the dg-do run directive resolves this issue for non-vector
targets (while still running the tests on vector targets).

gcc/testsuite/ChangeLog:

	* gfortran.dg/vect/pr107254.f90: Remove dg-do run directive.
	* gfortran.dg/vect/pr85853.f90: Ditto.
	* gfortran.dg/vect/vect-alias-check-1.F90: Ditto.

Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
---
Tested using rv64gc & rv64gcv to make sure the testcases compile/run
as expected.

These files haven't been changed in a long time so I'm not sure why (or
if) this hasn't been run into by other people before.
---
 gcc/testsuite/gfortran.dg/vect/pr107254.f90           | 2 --
 gcc/testsuite/gfortran.dg/vect/pr85853.f90            | 1 -
 gcc/testsuite/gfortran.dg/vect/vect-alias-check-1.F90 | 1 -
 3 files changed, 4 deletions(-)
  

Comments

Patrick O'Neill Nov. 16, 2023, 12:03 a.m. UTC | #1
Ping.

Testsuite fixup similar to:
https://inbox.sourceware.org/gcc-patches/974e9e5e-8f07-46dd-b9b9-db8aa46859b5@gmail.com/T/#t
https://inbox.sourceware.org/gcc-patches/7e78cd70-70c9-41b1-8a98-6977a103429e@rivosinc.com/T/#t

Patrick

On Thu, Nov 2, 2023 at 12:09 PM Patrick O'Neill <patrick@rivosinc.com> 
wrote:
>
> Testcases in gfortran.dg/vect/vect.exp rely on
> check_vect_support_and_set_flags to set dg-do-what-default and avoid
> running vector tests on non-vector targets. The three testcases in this
> patch overwrite the default with dg-do run which causes issues
> for non-vector targets.
>
> Removing the dg-do run directive resolves this issue for non-vector
> targets (while still running the tests on vector targets).
>
> gcc/testsuite/ChangeLog:
>
>         * gfortran.dg/vect/pr107254.f90: Remove dg-do run directive.
>         * gfortran.dg/vect/pr85853.f90: Ditto.
>         * gfortran.dg/vect/vect-alias-check-1.F90: Ditto.
>
> Signed-off-by: Patrick O'Neill <patrick@rivosinc.com>
> ---
> Tested using rv64gc & rv64gcv to make sure the testcases compile/run
> as expected.
>
> These files haven't been changed in a long time so I'm not sure why (or
> if) this hasn't been run into by other people before.
> ---
>  gcc/testsuite/gfortran.dg/vect/pr107254.f90           | 2 --
>  gcc/testsuite/gfortran.dg/vect/pr85853.f90            | 1 -
>  gcc/testsuite/gfortran.dg/vect/vect-alias-check-1.F90 | 1 -
>  3 files changed, 4 deletions(-)
>
> diff --git a/gcc/testsuite/gfortran.dg/vect/pr107254.f90 b/gcc/testsuite/gfortran.dg/vect/pr107254.f90
> index 85bcb5f3fa2..adce6bedc30 100644
> --- a/gcc/testsuite/gfortran.dg/vect/pr107254.f90
> +++ b/gcc/testsuite/gfortran.dg/vect/pr107254.f90
> @@ -1,5 +1,3 @@
> -! { dg-do run }
> -
>  subroutine dlartg( f, g, s, r )
>    implicit none
>    double precision :: f, g, r, s
> diff --git a/gcc/testsuite/gfortran.dg/vect/pr85853.f90 b/gcc/testsuite/gfortran.dg/vect/pr85853.f90
> index 68f4a004324..4c0e3b81a09 100644
> --- a/gcc/testsuite/gfortran.dg/vect/pr85853.f90
> +++ b/gcc/testsuite/gfortran.dg/vect/pr85853.f90
> @@ -1,5 +1,4 @@
>  ! Taken from execute/where_2.f90, but with special flags.
> -! { dg-do run }
>  ! { dg-additional-options "-fno-tree-loop-vectorize" }
>
>  ! Program to test the WHERE constructs
> diff --git a/gcc/testsuite/gfortran.dg/vect/vect-alias-check-1.F90 b/gcc/testsuite/gfortran.dg/vect/vect-alias-check-1.F90
> index 3014ff9f3b6..85ae9b151e3 100644
> --- a/gcc/testsuite/gfortran.dg/vect/vect-alias-check-1.F90
> +++ b/gcc/testsuite/gfortran.dg/vect/vect-alias-check-1.F90
> @@ -1,4 +1,3 @@
> -! { dg-do run }
>  ! { dg-additional-options "-fno-inline" }
>
>  #define N 200
> --
> 2.34.1
>
  
Jeff Law Nov. 19, 2023, 4:09 a.m. UTC | #2
On 11/15/23 17:03, Patrick O'Neill wrote:
> Ping.
> 
> Testsuite fixup similar to:
> https://inbox.sourceware.org/gcc-patches/974e9e5e-8f07-46dd-b9b9-db8aa46859b5@gmail.com/T/#t
> https://inbox.sourceware.org/gcc-patches/7e78cd70-70c9-41b1-8a98-6977a103429e@rivosinc.com/T/#t
OK.


Jeff
  
Patrick O'Neill Nov. 21, 2023, 6:03 p.m. UTC | #3
On 11/18/23 20:09, Jeff Law wrote:
>
>
> On 11/15/23 17:03, Patrick O'Neill wrote:
>> Ping.
>>
>> Testsuite fixup similar to:
>> https://inbox.sourceware.org/gcc-patches/974e9e5e-8f07-46dd-b9b9-db8aa46859b5@gmail.com/T/#t 
>>
>> https://inbox.sourceware.org/gcc-patches/7e78cd70-70c9-41b1-8a98-6977a103429e@rivosinc.com/T/#t 
>>
> OK.
>
>
> Jeff

Committed.

Patrick
  

Patch

diff --git a/gcc/testsuite/gfortran.dg/vect/pr107254.f90 b/gcc/testsuite/gfortran.dg/vect/pr107254.f90
index 85bcb5f3fa2..adce6bedc30 100644
--- a/gcc/testsuite/gfortran.dg/vect/pr107254.f90
+++ b/gcc/testsuite/gfortran.dg/vect/pr107254.f90
@@ -1,5 +1,3 @@ 
-! { dg-do run }
-
 subroutine dlartg( f, g, s, r )
   implicit none
   double precision :: f, g, r, s
diff --git a/gcc/testsuite/gfortran.dg/vect/pr85853.f90 b/gcc/testsuite/gfortran.dg/vect/pr85853.f90
index 68f4a004324..4c0e3b81a09 100644
--- a/gcc/testsuite/gfortran.dg/vect/pr85853.f90
+++ b/gcc/testsuite/gfortran.dg/vect/pr85853.f90
@@ -1,5 +1,4 @@ 
 ! Taken from execute/where_2.f90, but with special flags.
-! { dg-do run }
 ! { dg-additional-options "-fno-tree-loop-vectorize" }
 
 ! Program to test the WHERE constructs
diff --git a/gcc/testsuite/gfortran.dg/vect/vect-alias-check-1.F90 b/gcc/testsuite/gfortran.dg/vect/vect-alias-check-1.F90
index 3014ff9f3b6..85ae9b151e3 100644
--- a/gcc/testsuite/gfortran.dg/vect/vect-alias-check-1.F90
+++ b/gcc/testsuite/gfortran.dg/vect/vect-alias-check-1.F90
@@ -1,4 +1,3 @@ 
-! { dg-do run }
 ! { dg-additional-options "-fno-inline" }
 
 #define N 200