Re: [libgomp, testsuite] Remove superfluous -fopenmp from libgomp testcases

2017-09-28 Thread Tom de Vries

On 09/28/2017 10:37 AM, Thomas Schwinge wrote:

Hi Tom!

On Thu, 28 Sep 2017 09:41:15 +0200, Tom de Vries  wrote:

On 11/07/2013 09:11 AM, Jakub Jelinek wrote:

On Wed, Nov 06, 2013 at 08:42:16PM +0100, tho...@codesourcery.com wrote:

From: Thomas Schwinge 

libgomp/
* testsuite/lib/libgomp.exp (libgomp_init): Don't add -fopenmp to
ALWAYS_CFLAGS.
* testsuite/libgomp.c++/c++.exp (ALWAYS_CFLAGS): Add -fopenmp.
* testsuite/libgomp.c/c.exp (ALWAYS_CFLAGS): Likewise.
* testsuite/libgomp.fortran/fortran.exp (ALWAYS_CFLAGS): Likewise.
* testsuite/libgomp.graphite/graphite.exp (ALWAYS_CFLAGS):
Likewise.


Note that my patch just moved *where* the flag gets set, so...


Following up on this, how about we drop the now superfluous -fopenmp in
current test-cases?


... it has already been superfluous before.  ;-)

Anyway: ACK conceptually.


Tested on x86_64. Verified by analyzing libgomp.log that -fopenmp is
still passed to test-cases as required.

OK for trunk?



--- a/libgomp/testsuite/libgomp.c++/for-12.C
+++ b/libgomp/testsuite/libgomp.c++/for-12.C
@@ -1,5 +1,3 @@
-/* { dg-options "-fopenmp" } */


As far as I remember, this means that instead of "-fopenmp" the
"DEFAULT_CFLAGS" will then be used: "-O2", so this effectively changes
testing from "-O2" to "-O2".


I think you mean from "-O0" to "-O2", but yes.

I was explicit about this in an earlier commit ( 
https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00487.html ), but forgot 
again about it here.


Anyway, I think we only care about preserving explicit "-O0" settings, 
so this should be ok.



With that fixed: Reviewed-by: Thomas Schwinge 


You just got the first review credits in the commit log since 2004 ;)

Thanks,
- Tom


Re: [libgomp, testsuite] Remove superfluous -fopenmp from libgomp testcases

2017-09-28 Thread Jakub Jelinek
On Thu, Sep 28, 2017 at 09:41:15AM +0200, Tom de Vries wrote:
> [ was: Re: [gomp4 2/9] libgomp: Prepare for testcases without -fopenmp. ]
> 
> On 11/07/2013 09:11 AM, Jakub Jelinek wrote:
> > On Wed, Nov 06, 2013 at 08:42:16PM +0100, tho...@codesourcery.com wrote:
> > > From: Thomas Schwinge 
> > > 
> > >   libgomp/
> > >   * testsuite/lib/libgomp.exp (libgomp_init): Don't add -fopenmp to
> > >   ALWAYS_CFLAGS.
> > >   * testsuite/libgomp.c++/c++.exp (ALWAYS_CFLAGS): Add -fopenmp.
> > >   * testsuite/libgomp.c/c.exp (ALWAYS_CFLAGS): Likewise.
> > >   * testsuite/libgomp.fortran/fortran.exp (ALWAYS_CFLAGS): Likewise.
> > >   * testsuite/libgomp.graphite/graphite.exp (ALWAYS_CFLAGS):
> > >   Likewise.
> > 
> > Ok for trunk/gomp-4_0-branch.
> 
> Following up on this, how about we drop the now superfluous -fopenmp in
> current test-cases?
> 
> Tested on x86_64. Verified by analyzing libgomp.log that -fopenmp is still
> passed to test-cases as required.
> 
> OK for trunk?
> 
> Thanks,
> - Tom

> Remove superfluous -fopenmp from libgomp testcases
> 
> 2017-09-16  Tom de Vries  
> 
>   * testsuite/libgomp.c++/for-12.C: Remove superfluous -fopenmp option
>   setting.
>   * testsuite/libgomp.c++/pr69393.C: Same.
>   * testsuite/libgomp.c++/taskloop-1.C: Same.
>   * testsuite/libgomp.c++/taskloop-3.C: Same.
>   * testsuite/libgomp.c++/taskloop-4.C: Same.
>   * testsuite/libgomp.c/for-4.c: Same.
>   * testsuite/libgomp.c/pr66199-3.c: Same.
>   * testsuite/libgomp.c/pr66199-4.c: Same.
>   * testsuite/libgomp.c/pr66199-6.c: Same.
>   * testsuite/libgomp.c/taskloop-1.c: Same.
>   * testsuite/libgomp.c/taskloop-3.c: Same.
>   * testsuite/libgomp.c/taskloop-4.c: Same.
>   * testsuite/libgomp.fortran/aligned1.f03: Same.
>   * testsuite/libgomp.fortran/condinc1.f: Same.
>   * testsuite/libgomp.fortran/condinc3.f90: Same.
>   * testsuite/libgomp.fortran/crayptr1.f90: Same.
>   * testsuite/libgomp.fortran/crayptr2.f90: Same.
>   * testsuite/libgomp.fortran/crayptr3.f90: Same.
>   * testsuite/libgomp.fortran/omp_cond1.f: Same.
>   * testsuite/libgomp.fortran/omp_cond3.F90: Same.
>   * testsuite/libgomp.fortran/pr66199-1.f90: Same.
>   * testsuite/libgomp.fortran/pr66199-2.f90: Same.
>   * testsuite/libgomp.fortran/recursion1.f90: Same.
>   * testsuite/libgomp.fortran/target2.f90: Same.
>   * testsuite/libgomp.fortran/target5.f90: Same.
>   * testsuite/libgomp.fortran/task3.f90: Same.

Ok.

Jakub


Re: [libgomp, testsuite] Remove superfluous -fopenmp from libgomp testcases

2017-09-28 Thread Thomas Schwinge
Hi Tom!

On Thu, 28 Sep 2017 09:41:15 +0200, Tom de Vries  wrote:
> On 11/07/2013 09:11 AM, Jakub Jelinek wrote:
> > On Wed, Nov 06, 2013 at 08:42:16PM +0100, tho...@codesourcery.com wrote:
> >> From: Thomas Schwinge 
> >>
> >>libgomp/
> >>* testsuite/lib/libgomp.exp (libgomp_init): Don't add -fopenmp to
> >>ALWAYS_CFLAGS.
> >>* testsuite/libgomp.c++/c++.exp (ALWAYS_CFLAGS): Add -fopenmp.
> >>* testsuite/libgomp.c/c.exp (ALWAYS_CFLAGS): Likewise.
> >>* testsuite/libgomp.fortran/fortran.exp (ALWAYS_CFLAGS): Likewise.
> >>* testsuite/libgomp.graphite/graphite.exp (ALWAYS_CFLAGS):
> >>Likewise.

Note that my patch just moved *where* the flag gets set, so...

> Following up on this, how about we drop the now superfluous -fopenmp in 
> current test-cases?

... it has already been superfluous before.  ;-)

Anyway: ACK conceptually.

> Tested on x86_64. Verified by analyzing libgomp.log that -fopenmp is 
> still passed to test-cases as required.
> 
> OK for trunk?

> --- a/libgomp/testsuite/libgomp.c++/for-12.C
> +++ b/libgomp/testsuite/libgomp.c++/for-12.C
> @@ -1,5 +1,3 @@
> -/* { dg-options "-fopenmp" } */

As far as I remember, this means that instead of "-fopenmp" the
"DEFAULT_CFLAGS" will then be used: "-O2", so this effectively changes
testing from "-O2" to "-O2".  Same for a few other cases where you remove
"dg-options" altogether.  Special consideration required for fortran,
which should never specify these in "dg-options" because it cycles
("torture testing") through different optimization flags.

With that fixed: Reviewed-by: Thomas Schwinge 
(See
.)
But I can't formally approve, of course.


Grüße
 Thomas


[libgomp, testsuite] Remove superfluous -fopenmp from libgomp testcases

2017-09-28 Thread Tom de Vries

[ was: Re: [gomp4 2/9] libgomp: Prepare for testcases without -fopenmp. ]

On 11/07/2013 09:11 AM, Jakub Jelinek wrote:

On Wed, Nov 06, 2013 at 08:42:16PM +0100, tho...@codesourcery.com wrote:

From: Thomas Schwinge 

libgomp/
* testsuite/lib/libgomp.exp (libgomp_init): Don't add -fopenmp to
ALWAYS_CFLAGS.
* testsuite/libgomp.c++/c++.exp (ALWAYS_CFLAGS): Add -fopenmp.
* testsuite/libgomp.c/c.exp (ALWAYS_CFLAGS): Likewise.
* testsuite/libgomp.fortran/fortran.exp (ALWAYS_CFLAGS): Likewise.
* testsuite/libgomp.graphite/graphite.exp (ALWAYS_CFLAGS):
Likewise.


Ok for trunk/gomp-4_0-branch.


Following up on this, how about we drop the now superfluous -fopenmp in 
current test-cases?


Tested on x86_64. Verified by analyzing libgomp.log that -fopenmp is 
still passed to test-cases as required.


OK for trunk?

Thanks,
- Tom
Remove superfluous -fopenmp from libgomp testcases

2017-09-16  Tom de Vries  

	* testsuite/libgomp.c++/for-12.C: Remove superfluous -fopenmp option
	setting.
	* testsuite/libgomp.c++/pr69393.C: Same.
	* testsuite/libgomp.c++/taskloop-1.C: Same.
	* testsuite/libgomp.c++/taskloop-3.C: Same.
	* testsuite/libgomp.c++/taskloop-4.C: Same.
	* testsuite/libgomp.c/for-4.c: Same.
	* testsuite/libgomp.c/pr66199-3.c: Same.
	* testsuite/libgomp.c/pr66199-4.c: Same.
	* testsuite/libgomp.c/pr66199-6.c: Same.
	* testsuite/libgomp.c/taskloop-1.c: Same.
	* testsuite/libgomp.c/taskloop-3.c: Same.
	* testsuite/libgomp.c/taskloop-4.c: Same.
	* testsuite/libgomp.fortran/aligned1.f03: Same.
	* testsuite/libgomp.fortran/condinc1.f: Same.
	* testsuite/libgomp.fortran/condinc3.f90: Same.
	* testsuite/libgomp.fortran/crayptr1.f90: Same.
	* testsuite/libgomp.fortran/crayptr2.f90: Same.
	* testsuite/libgomp.fortran/crayptr3.f90: Same.
	* testsuite/libgomp.fortran/omp_cond1.f: Same.
	* testsuite/libgomp.fortran/omp_cond3.F90: Same.
	* testsuite/libgomp.fortran/pr66199-1.f90: Same.
	* testsuite/libgomp.fortran/pr66199-2.f90: Same.
	* testsuite/libgomp.fortran/recursion1.f90: Same.
	* testsuite/libgomp.fortran/target2.f90: Same.
	* testsuite/libgomp.fortran/target5.f90: Same.
	* testsuite/libgomp.fortran/task3.f90: Same.

---
 libgomp/testsuite/libgomp.c++/for-12.C   | 2 --
 libgomp/testsuite/libgomp.c++/pr69393.C  | 2 +-
 libgomp/testsuite/libgomp.c++/taskloop-1.C   | 2 +-
 libgomp/testsuite/libgomp.c++/taskloop-3.C   | 2 +-
 libgomp/testsuite/libgomp.c++/taskloop-4.C   | 2 +-
 libgomp/testsuite/libgomp.c/for-4.c  | 2 +-
 libgomp/testsuite/libgomp.c/pr66199-3.c  | 2 +-
 libgomp/testsuite/libgomp.c/pr66199-4.c  | 2 +-
 libgomp/testsuite/libgomp.c/pr66199-6.c  | 2 +-
 libgomp/testsuite/libgomp.c/taskloop-1.c | 2 +-
 libgomp/testsuite/libgomp.c/taskloop-3.c | 2 +-
 libgomp/testsuite/libgomp.c/taskloop-4.c | 2 +-
 libgomp/testsuite/libgomp.fortran/aligned1.f03   | 2 +-
 libgomp/testsuite/libgomp.fortran/condinc1.f | 1 -
 libgomp/testsuite/libgomp.fortran/condinc3.f90   | 1 -
 libgomp/testsuite/libgomp.fortran/crayptr1.f90   | 2 +-
 libgomp/testsuite/libgomp.fortran/crayptr2.f90   | 2 +-
 libgomp/testsuite/libgomp.fortran/crayptr3.f90   | 2 +-
 libgomp/testsuite/libgomp.fortran/omp_cond1.f| 1 -
 libgomp/testsuite/libgomp.fortran/omp_cond3.F90  | 1 -
 libgomp/testsuite/libgomp.fortran/pr66199-1.f90  | 2 +-
 libgomp/testsuite/libgomp.fortran/pr66199-2.f90  | 2 +-
 libgomp/testsuite/libgomp.fortran/recursion1.f90 | 2 +-
 libgomp/testsuite/libgomp.fortran/target2.f90| 2 +-
 libgomp/testsuite/libgomp.fortran/target5.f90| 1 -
 libgomp/testsuite/libgomp.fortran/task3.f90  | 1 -
 26 files changed, 19 insertions(+), 27 deletions(-)

diff --git a/libgomp/testsuite/libgomp.c++/for-12.C b/libgomp/testsuite/libgomp.c++/for-12.C
index ea32192..295b12f 100644
--- a/libgomp/testsuite/libgomp.c++/for-12.C
+++ b/libgomp/testsuite/libgomp.c++/for-12.C
@@ -1,5 +1,3 @@
-/* { dg-options "-fopenmp" } */
-
 extern "C" void abort (void);
 
 #define M(x, y, z) O(x, y, z)
diff --git a/libgomp/testsuite/libgomp.c++/pr69393.C b/libgomp/testsuite/libgomp.c++/pr69393.C
index e3f0de1..02605e0 100644
--- a/libgomp/testsuite/libgomp.c++/pr69393.C
+++ b/libgomp/testsuite/libgomp.c++/pr69393.C
@@ -1,6 +1,6 @@
 // { dg-do run }
 // { dg-require-effective-target lto }
-// { dg-options "-flto -g -fopenmp" }
+// { dg-options "-flto -g" }
 
 int e = 5;
 
diff --git a/libgomp/testsuite/libgomp.c++/taskloop-1.C b/libgomp/testsuite/libgomp.c++/taskloop-1.C
index 66f8e0b..7fc6e46 100644
--- a/libgomp/testsuite/libgomp.c++/taskloop-1.C
+++ b/libgomp/testsuite/libgomp.c++/taskloop-1.C
@@ -1,4 +1,4 @@
 // { dg-do run }
-// { dg-options "-O2 -fopenmp" }
+// { dg-options "-O2" }
 
 #include "../libgomp.c/taskloop-1.c"
diff --git a/libgomp/testsuite/libgomp.c++/taskloop-3.C b/libgomp/testsuite/libgomp.c++/taskloop-3.C
index bfd793c..c08a045 100644
---