testsuite/libgomp.fortran/pr66199-2.f90 – remove dg-options
diff mbox series

Message ID 657de55b-a1ec-c46b-f76b-5ef97483303d@codesourcery.com
State New
Headers show
Series
  • testsuite/libgomp.fortran/pr66199-2.f90 – remove dg-options
Related show

Commit Message

Tobias Burnus Nov. 4, 2019, 12:18 p.m. UTC
This test case had from the beginning both
  ! { dg-do run }
  ! { dg-options "-O2" }

However, 'dg-do run' implies torture, i.e. multiple optimization options,
while 'dg-options "-O2"' implies -O2, only.

This means that the test case is compiled 4 times with
"-O0", "-O1", "-O3 -f…" and "-Os" – followed by "-O2".
Hence, it is run 4 times with nearly identical options
(With "-O3" [followed by "-O2"], the "-fomit-frame-pointer -funroll-loops -fpeel-loops
-ftracer -finline-functions" options do get added.)

Hence, we can either remove "dg-do run" or "dg-options". I suggest to remove
the latter.

OK?

Tobias

Comments

Jakub Jelinek Nov. 4, 2019, 12:29 p.m. UTC | #1
On Mon, Nov 04, 2019 at 01:18:58PM +0100, Tobias Burnus wrote:
> This test case had from the beginning both
>  ! { dg-do run }
>  ! { dg-options "-O2" }
> 
> However, 'dg-do run' implies torture, i.e. multiple optimization options,
> while 'dg-options "-O2"' implies -O2, only.
> 
> This means that the test case is compiled 4 times with
> "-O0", "-O1", "-O3 -f…" and "-Os" – followed by "-O2".
> Hence, it is run 4 times with nearly identical options
> (With "-O3" [followed by "-O2"], the "-fomit-frame-pointer -funroll-loops -fpeel-loops
> -ftracer -finline-functions" options do get added.)
> 
> Hence, we can either remove "dg-do run" or "dg-options". I suggest to remove
> the latter.
> 
> OK?

Note, pr66199-1.f90 has the same issue.  And I'd probably go for
the removal of dg-do run instead.

	Jakub
Tobias Burnus Nov. 4, 2019, 1:02 p.m. UTC | #2
On 11/4/19 1:29 PM, Jakub Jelinek wrote:
> Note, pr66199-1.f90 has the same issue. And I'd probably go for the 
> removal of dg-do run instead.

Well, there are even more (ignoring those which have -std=legacy or 
-fno-inline or … in dg-options): 
libgomp.fortran/examples-4/declare_target-5.f90, 
libgomp.fortran/taskloop[234].f90

libgomp.fortran/examples-4/declare_target-5.f90:! { dg-do run { target vect_simd_clones } }

I assume, you prefer no "dg-do run" for those as well:
How about the attached patch?

Tobias
Jakub Jelinek Nov. 4, 2019, 1:05 p.m. UTC | #3
On Mon, Nov 04, 2019 at 02:02:38PM +0100, Tobias Burnus wrote:
> On 11/4/19 1:29 PM, Jakub Jelinek wrote:
> > Note, pr66199-1.f90 has the same issue. And I'd probably go for the
> > removal of dg-do run instead.
> 
> Well, there are even more (ignoring those which have -std=legacy or
> -fno-inline or … in dg-options):
> libgomp.fortran/examples-4/declare_target-5.f90,
> libgomp.fortran/taskloop[234].f90
> 
> libgomp.fortran/examples-4/declare_target-5.f90:! { dg-do run { target vect_simd_clones } }

That vect_simd_clones can't be dropped of course.

> I assume, you prefer no "dg-do run" for those as well:
> How about the attached patch?

But your patch doesn't do that, so ok for trunk.

> 2019-11-04  Tobias Burnus  <tobias@codesourcery.com>
> 
> 	* testsuite/libgomp.fortran/pr66199-1.f90: Remove
> 	'dg-do run' (implies torture test) as 'dg-options "O2"' is used.
> 	* testsuite/libgomp.fortran/pr66199-2.f90: Ditto.
> 	* testsuite/libgomp.fortran/taskloop2.f90: Ditto.
> 	* testsuite/libgomp.fortran/taskloop3.f90: Ditto.
> 	* testsuite/libgomp.fortran/taskloop4.f90: Ditto.

	Jakub

Patch
diff mbox series

2019-11-04  Tobias Burnus  <tobias@codesourcery.com>

	* testsuite/libgomp.fortran/pr66199-2.f90: Remove
	dg-options from torture test.

diff --git a/libgomp/testsuite/libgomp.fortran/pr66199-2.f90 b/libgomp/testsuite/libgomp.fortran/pr66199-2.f90
index 0cc0fa5097f..5ee74149089 100644
--- a/libgomp/testsuite/libgomp.fortran/pr66199-2.f90
+++ b/libgomp/testsuite/libgomp.fortran/pr66199-2.f90
@@ -1,6 +1,5 @@ 
 ! PR middle-end/66199
 ! { dg-do run }
-! { dg-options "-O2" }
 
   integer :: u(1024), v(1024), w(1024), a, b, c, d, e, a1, b1, a2, b2, d1, d2
   a = 1