public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [hsa, testsuite] Suppress hsa warnings in libgomp tests
@ 2016-02-26 16:00 Martin Jambor
  2016-02-26 16:08 ` Jakub Jelinek
  0 siblings, 1 reply; 13+ messages in thread
From: Martin Jambor @ 2016-02-26 16:00 UTC (permalink / raw)
  To: GCC Patches

Hi,

just like with the compiler gomp testsuite, we need to add -Wno-hsa to
options when compiling libgomp testcases in order not to have "excess
errors" failures when HSA is enabled.  There are quite many of such
testcases on the trunk because I have disabled the dynamic parallelism
way of executing stuff.  Hopefully we'll be able to revert many of the
hunks below when we get that working.

The patch has been tested both with and without HSA enabled.  OK for
trunk?

Thanks,

Martin

2016-02-12  Martin Jambor  <mjambor@suse.cz>

	* testsuite/libgomp.c++/examples-4/target_data-5.C: Do not generate
	HSA warnings.
	* testsuite/libgomp.c++/for-11.C: Likewise.
	* testsuite/libgomp.c++/for-13.C: Likewise.
	* testsuite/libgomp.c++/for-14.C: Likewise.
	* testsuite/libgomp.c++/pr66199-2.C: Likewise.
	* testsuite/libgomp.c++/pr66199-4.C: Likewise.
	* testsuite/libgomp.c++/pr66199-5.C: Likewise.
	* testsuite/libgomp.c++/pr66199-6.C: Likewise.
	* testsuite/libgomp.c++/pr66199-7.C: Likewise.
	* testsuite/libgomp.c++/pr66199-8.C: Likewise.
	* testsuite/libgomp.c++/target-1.C: Likewise.
	* testsuite/libgomp.c++/target-2.C: Likewise.
	* testsuite/libgomp.c++/target-3.C: Likewise.
	* testsuite/libgomp.c++/target-8.C: Likewise.
	* testsuite/libgomp.c/examples-4/async_target-1.c: Likewise.
	* testsuite/libgomp.c/examples-4/declare_target-3.c: Likewise.
	* testsuite/libgomp.c/examples-4/declare_target-4.c: Likewise.
	* testsuite/libgomp.c/examples-4/declare_target-5.c: Likewise.
	* testsuite/libgomp.c/examples-4/target-1.c: Likewise.
	* testsuite/libgomp.c/examples-4/target-2.c: Likewise.
	* testsuite/libgomp.c/examples-4/target-3.c: Likewise.
	* testsuite/libgomp.c/examples-4/target-4.c: Likewise.
	* testsuite/libgomp.c/examples-4/target_data-1.c: Likewise.
	* testsuite/libgomp.c/examples-4/target_data-2.c: Likewise.
	* testsuite/libgomp.c/examples-4/target_data-3.c: Likewise.
	* testsuite/libgomp.c/examples-4/target_data-4.c: Likewise.
	* testsuite/libgomp.c/examples-4/target_update-1.c: Likewise.
	* testsuite/libgomp.c/examples-4/target_update-2.c: Likewise.
	* testsuite/libgomp.c/examples-4/teams-2.c: Likewise.
	* testsuite/libgomp.c/examples-4/teams-3.c: Likewise.
	* testsuite/libgomp.c/examples-4/teams-4.c: Likewise.
	* testsuite/libgomp.c/examples-4/teams-6.c: Likewise.
	* testsuite/libgomp.c/for-3.c: Likewise.
	* testsuite/libgomp.c/for-5.c: Likewise.
	* testsuite/libgomp.c/for-6.c: Likewise.
	* testsuite/libgomp.c/pr66199-2.c: Likewise.
	* testsuite/libgomp.c/pr66199-4.c: Likewise.
	* testsuite/libgomp.c/pr66199-5.c: Likewise.
	* testsuite/libgomp.c/pr66199-6.c: Likewise.
	* testsuite/libgomp.c/pr66199-7.c: Likewise.
	* testsuite/libgomp.c/pr66199-8.c: Likewise.
	* testsuite/libgomp.c/pr66714.c: Likewise.
	* testsuite/libgomp.c/target-1.c: Likewise.
	* testsuite/libgomp.c/target-16.c: Likewise.
	* testsuite/libgomp.c/target-2.c: Likewise.
	* testsuite/libgomp.c/target-31.c: Likewise.
	* testsuite/libgomp.c/target-32.c: Likewise.
	* testsuite/libgomp.c/target-35.c: Likewise.
	* testsuite/libgomp.c/target-5.c: Likewise.
	* testsuite/libgomp.c/target-6.c: Likewise.
	* testsuite/libgomp.c/target-critical-1.c: Likewise.
	* testsuite/libgomp.c/target-teams-1.c: Likewise.
	* testsuite/libgomp.c/thread-limit-2.c: Likewise.
	* testsuite/libgomp.c/thread-limit-3.c: Likewise.
	* testsuite/libgomp.fortran/examples-4/async_target-1.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/async_target-2.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/declare_target-2.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/declare_target-3.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/declare_target-4.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/declare_target-5.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/target-1.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/target-2.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/target-3.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/target-4.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/target_data-1.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/target_data-2.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/target_data-3.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/target_data-4.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/target_data-5.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/target_update-1.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/target_update-2.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/teams-2.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/teams-3.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/teams-4.f90: Likewise.
	* testsuite/libgomp.fortran/examples-4/teams-6.f90: Likewise.
	* testsuite/libgomp.fortran/nestedfn5.f90: Likewise.
	* testsuite/libgomp.fortran/pr66199-2.f90: Likewise.
	* testsuite/libgomp.fortran/target1.f90: Likewise.
	* testsuite/libgomp.fortran/target4.f90: Likewise.
	* testsuite/libgomp.fortran/target5.f90: Likewise.
	* testsuite/libgomp.fortran/target6.f90: Likewise.
	* testsuite/libgomp.fortran/target7.f90: Likewise.
	* testsuite/libgomp.fortran/target8.f90: Likewise.
---
 libgomp/testsuite/libgomp.c++/examples-4/target_data-5.C          | 1 +
 libgomp/testsuite/libgomp.c++/for-11.C                            | 2 ++
 libgomp/testsuite/libgomp.c++/for-13.C                            | 2 ++
 libgomp/testsuite/libgomp.c++/for-14.C                            | 2 ++
 libgomp/testsuite/libgomp.c++/pr66199-2.C                         | 1 +
 libgomp/testsuite/libgomp.c++/pr66199-4.C                         | 1 +
 libgomp/testsuite/libgomp.c++/pr66199-5.C                         | 1 +
 libgomp/testsuite/libgomp.c++/pr66199-6.C                         | 1 +
 libgomp/testsuite/libgomp.c++/pr66199-7.C                         | 1 +
 libgomp/testsuite/libgomp.c++/pr66199-8.C                         | 1 +
 libgomp/testsuite/libgomp.c++/target-1.C                          | 2 ++
 libgomp/testsuite/libgomp.c++/target-2.C                          | 1 +
 libgomp/testsuite/libgomp.c++/target-3.C                          | 2 ++
 libgomp/testsuite/libgomp.c++/target-8.C                          | 2 ++
 libgomp/testsuite/libgomp.c/examples-4/async_target-1.c           | 4 ++--
 libgomp/testsuite/libgomp.c/examples-4/declare_target-3.c         | 2 ++
 libgomp/testsuite/libgomp.c/examples-4/declare_target-4.c         | 2 +-
 libgomp/testsuite/libgomp.c/examples-4/declare_target-5.c         | 1 +
 libgomp/testsuite/libgomp.c/examples-4/target-1.c                 | 1 +
 libgomp/testsuite/libgomp.c/examples-4/target-2.c                 | 1 +
 libgomp/testsuite/libgomp.c/examples-4/target-3.c                 | 1 +
 libgomp/testsuite/libgomp.c/examples-4/target-4.c                 | 1 +
 libgomp/testsuite/libgomp.c/examples-4/target_data-1.c            | 1 +
 libgomp/testsuite/libgomp.c/examples-4/target_data-2.c            | 1 +
 libgomp/testsuite/libgomp.c/examples-4/target_data-3.c            | 1 +
 libgomp/testsuite/libgomp.c/examples-4/target_data-4.c            | 1 +
 libgomp/testsuite/libgomp.c/examples-4/target_update-1.c          | 1 +
 libgomp/testsuite/libgomp.c/examples-4/target_update-2.c          | 1 +
 libgomp/testsuite/libgomp.c/examples-4/teams-2.c                  | 1 +
 libgomp/testsuite/libgomp.c/examples-4/teams-3.c                  | 1 +
 libgomp/testsuite/libgomp.c/examples-4/teams-4.c                  | 1 +
 libgomp/testsuite/libgomp.c/examples-4/teams-6.c                  | 1 +
 libgomp/testsuite/libgomp.c/for-3.c                               | 2 +-
 libgomp/testsuite/libgomp.c/for-5.c                               | 2 +-
 libgomp/testsuite/libgomp.c/for-6.c                               | 2 +-
 libgomp/testsuite/libgomp.c/pr66199-2.c                           | 1 +
 libgomp/testsuite/libgomp.c/pr66199-4.c                           | 2 +-
 libgomp/testsuite/libgomp.c/pr66199-5.c                           | 1 +
 libgomp/testsuite/libgomp.c/pr66199-6.c                           | 2 +-
 libgomp/testsuite/libgomp.c/pr66199-7.c                           | 1 +
 libgomp/testsuite/libgomp.c/pr66199-8.c                           | 1 +
 libgomp/testsuite/libgomp.c/pr66714.c                             | 2 +-
 libgomp/testsuite/libgomp.c/target-1.c                            | 2 ++
 libgomp/testsuite/libgomp.c/target-16.c                           | 2 ++
 libgomp/testsuite/libgomp.c/target-2.c                            | 2 ++
 libgomp/testsuite/libgomp.c/target-31.c                           | 2 ++
 libgomp/testsuite/libgomp.c/target-32.c                           | 2 ++
 libgomp/testsuite/libgomp.c/target-35.c                           | 2 ++
 libgomp/testsuite/libgomp.c/target-5.c                            | 2 ++
 libgomp/testsuite/libgomp.c/target-6.c                            | 2 ++
 libgomp/testsuite/libgomp.c/target-critical-1.c                   | 1 +
 libgomp/testsuite/libgomp.c/target-teams-1.c                      | 1 +
 libgomp/testsuite/libgomp.c/thread-limit-2.c                      | 1 +
 libgomp/testsuite/libgomp.c/thread-limit-3.c                      | 2 ++
 libgomp/testsuite/libgomp.fortran/examples-4/async_target-1.f90   | 1 +
 libgomp/testsuite/libgomp.fortran/examples-4/async_target-2.f90   | 1 +
 libgomp/testsuite/libgomp.fortran/examples-4/declare_target-2.f90 | 1 +
 libgomp/testsuite/libgomp.fortran/examples-4/declare_target-3.f90 | 1 +
 libgomp/testsuite/libgomp.fortran/examples-4/declare_target-4.f90 | 1 +
 libgomp/testsuite/libgomp.fortran/examples-4/declare_target-5.f90 | 2 +-
 libgomp/testsuite/libgomp.fortran/examples-4/target-1.f90         | 1 +
 libgomp/testsuite/libgomp.fortran/examples-4/target-2.f90         | 1 +
 libgomp/testsuite/libgomp.fortran/examples-4/target-3.f90         | 1 +
 libgomp/testsuite/libgomp.fortran/examples-4/target-4.f90         | 1 +
 libgomp/testsuite/libgomp.fortran/examples-4/target_data-1.f90    | 1 +
 libgomp/testsuite/libgomp.fortran/examples-4/target_data-2.f90    | 1 +
 libgomp/testsuite/libgomp.fortran/examples-4/target_data-3.f90    | 1 +
 libgomp/testsuite/libgomp.fortran/examples-4/target_data-4.f90    | 1 +
 libgomp/testsuite/libgomp.fortran/examples-4/target_data-5.f90    | 1 +
 libgomp/testsuite/libgomp.fortran/examples-4/target_update-1.f90  | 1 +
 libgomp/testsuite/libgomp.fortran/examples-4/target_update-2.f90  | 1 +
 libgomp/testsuite/libgomp.fortran/examples-4/teams-2.f90          | 1 +
 libgomp/testsuite/libgomp.fortran/examples-4/teams-3.f90          | 1 +
 libgomp/testsuite/libgomp.fortran/examples-4/teams-4.f90          | 1 +
 libgomp/testsuite/libgomp.fortran/examples-4/teams-6.f90          | 1 +
 libgomp/testsuite/libgomp.fortran/nestedfn5.f90                   | 1 +
 libgomp/testsuite/libgomp.fortran/pr66199-2.f90                   | 2 +-
 libgomp/testsuite/libgomp.fortran/target1.f90                     | 1 +
 libgomp/testsuite/libgomp.fortran/target4.f90                     | 1 +
 libgomp/testsuite/libgomp.fortran/target5.f90                     | 2 +-
 libgomp/testsuite/libgomp.fortran/target6.f90                     | 1 +
 libgomp/testsuite/libgomp.fortran/target7.f90                     | 1 +
 libgomp/testsuite/libgomp.fortran/target8.f90                     | 1 +
 83 files changed, 100 insertions(+), 12 deletions(-)

diff --git a/libgomp/testsuite/libgomp.c++/examples-4/target_data-5.C b/libgomp/testsuite/libgomp.c++/examples-4/target_data-5.C
index 4298e23..da18a80 100644
--- a/libgomp/testsuite/libgomp.c++/examples-4/target_data-5.C
+++ b/libgomp/testsuite/libgomp.c++/examples-4/target_data-5.C
@@ -1,4 +1,5 @@
 // { dg-do run }
+// { dg-additional-options "-Wno-hsa" }
 
 #include <omp.h>
 
diff --git a/libgomp/testsuite/libgomp.c++/for-11.C b/libgomp/testsuite/libgomp.c++/for-11.C
index 0244e4d..534ff6f 100644
--- a/libgomp/testsuite/libgomp.c++/for-11.C
+++ b/libgomp/testsuite/libgomp.c++/for-11.C
@@ -1,3 +1,5 @@
+// { dg-additional-options "-Wno-hsa" }
+
 extern "C" void abort ();
 
 #define M(x, y, z) O(x, y, z)
diff --git a/libgomp/testsuite/libgomp.c++/for-13.C b/libgomp/testsuite/libgomp.c++/for-13.C
index ac1601a..7c8e66e 100644
--- a/libgomp/testsuite/libgomp.c++/for-13.C
+++ b/libgomp/testsuite/libgomp.c++/for-13.C
@@ -1,3 +1,5 @@
+// { dg-additional-options "-Wno-hsa" }
+
 extern "C" void abort ();
 
 #define M(x, y, z) O(x, y, z)
diff --git a/libgomp/testsuite/libgomp.c++/for-14.C b/libgomp/testsuite/libgomp.c++/for-14.C
index 7738473..af73854 100644
--- a/libgomp/testsuite/libgomp.c++/for-14.C
+++ b/libgomp/testsuite/libgomp.c++/for-14.C
@@ -1,3 +1,5 @@
+// { dg-additional-options "-Wno-hsa" }
+
 extern "C" void abort ();
 
 #define M(x, y, z) O(x, y, z)
diff --git a/libgomp/testsuite/libgomp.c++/pr66199-2.C b/libgomp/testsuite/libgomp.c++/pr66199-2.C
index 1dbccb6..799990e 100644
--- a/libgomp/testsuite/libgomp.c++/pr66199-2.C
+++ b/libgomp/testsuite/libgomp.c++/pr66199-2.C
@@ -1,4 +1,5 @@
 // PR middle-end/66199
 // { dg-do run }
+// { dg-additional-options "-Wno-hsa" }
 
 #include "../libgomp.c/pr66199-2.c"
diff --git a/libgomp/testsuite/libgomp.c++/pr66199-4.C b/libgomp/testsuite/libgomp.c++/pr66199-4.C
index bc71a6d..b468fe1 100644
--- a/libgomp/testsuite/libgomp.c++/pr66199-4.C
+++ b/libgomp/testsuite/libgomp.c++/pr66199-4.C
@@ -1,4 +1,5 @@
 // PR middle-end/66199
 // { dg-do run }
+// { dg-additional-options "-Wno-hsa" }
 
 #include "../libgomp.c/pr66199-4.c"
diff --git a/libgomp/testsuite/libgomp.c++/pr66199-5.C b/libgomp/testsuite/libgomp.c++/pr66199-5.C
index c7549e8..5aafa20 100644
--- a/libgomp/testsuite/libgomp.c++/pr66199-5.C
+++ b/libgomp/testsuite/libgomp.c++/pr66199-5.C
@@ -1,4 +1,5 @@
 // PR middle-end/66199
 // { dg-do run }
+// { dg-additional-options "-Wno-hsa" }
 
 #include "../libgomp.c/pr66199-5.c"
diff --git a/libgomp/testsuite/libgomp.c++/pr66199-6.C b/libgomp/testsuite/libgomp.c++/pr66199-6.C
index 46adbd7..536b656 100644
--- a/libgomp/testsuite/libgomp.c++/pr66199-6.C
+++ b/libgomp/testsuite/libgomp.c++/pr66199-6.C
@@ -1,4 +1,5 @@
 // PR middle-end/66199
 // { dg-do run }
+// { dg-additional-options "-Wno-hsa" }
 
 #include "../libgomp.c/pr66199-6.c"
diff --git a/libgomp/testsuite/libgomp.c++/pr66199-7.C b/libgomp/testsuite/libgomp.c++/pr66199-7.C
index b03d284..0d33a53 100644
--- a/libgomp/testsuite/libgomp.c++/pr66199-7.C
+++ b/libgomp/testsuite/libgomp.c++/pr66199-7.C
@@ -1,4 +1,5 @@
 // PR middle-end/66199
 // { dg-do run }
+// { dg-additional-options "-Wno-hsa" }
 
 #include "../libgomp.c/pr66199-7.c"
diff --git a/libgomp/testsuite/libgomp.c++/pr66199-8.C b/libgomp/testsuite/libgomp.c++/pr66199-8.C
index b998ef6..c2db6ae 100644
--- a/libgomp/testsuite/libgomp.c++/pr66199-8.C
+++ b/libgomp/testsuite/libgomp.c++/pr66199-8.C
@@ -1,4 +1,5 @@
 // PR middle-end/66199
 // { dg-do run }
+// { dg-additional-options "-Wno-hsa" }
 
 #include "../libgomp.c/pr66199-8.c"
diff --git a/libgomp/testsuite/libgomp.c++/target-1.C b/libgomp/testsuite/libgomp.c++/target-1.C
index 3cf01d9..7cab5f1 100644
--- a/libgomp/testsuite/libgomp.c++/target-1.C
+++ b/libgomp/testsuite/libgomp.c++/target-1.C
@@ -1 +1,3 @@
+// { dg-additional-options "-Wno-hsa" }
+
 #include "../libgomp.c/target-1.c"
diff --git a/libgomp/testsuite/libgomp.c++/target-2.C b/libgomp/testsuite/libgomp.c++/target-2.C
index 1eab7f2..342a24f 100644
--- a/libgomp/testsuite/libgomp.c++/target-2.C
+++ b/libgomp/testsuite/libgomp.c++/target-2.C
@@ -1,4 +1,5 @@
 // { dg-additional-sources "target-2-aux.cc" }
+// { dg-additional-options "-Wno-hsa" }
 
 extern "C" void abort (void);
 
diff --git a/libgomp/testsuite/libgomp.c++/target-3.C b/libgomp/testsuite/libgomp.c++/target-3.C
index 2e4586f..9ea077a 100644
--- a/libgomp/testsuite/libgomp.c++/target-3.C
+++ b/libgomp/testsuite/libgomp.c++/target-3.C
@@ -1 +1,3 @@
+// { dg-additional-options "-Wno-hsa" }
+
 #include "../libgomp.c/target-2.c"
diff --git a/libgomp/testsuite/libgomp.c++/target-8.C b/libgomp/testsuite/libgomp.c++/target-8.C
index d886b47..e43b973 100644
--- a/libgomp/testsuite/libgomp.c++/target-8.C
+++ b/libgomp/testsuite/libgomp.c++/target-8.C
@@ -1,3 +1,5 @@
+// { dg-additional-options "-Wno-hsa" }
+
 extern "C" void abort ();
 struct S { int a; };
 #ifdef __SIZEOF_INT128__
diff --git a/libgomp/testsuite/libgomp.c/examples-4/async_target-1.c b/libgomp/testsuite/libgomp.c/examples-4/async_target-1.c
index b2e1f1f..9076128 100644
--- a/libgomp/testsuite/libgomp.c/examples-4/async_target-1.c
+++ b/libgomp/testsuite/libgomp.c/examples-4/async_target-1.c
@@ -1,6 +1,6 @@
 /* { dg-do run } */
-/* { dg-additional-options "-DCHUNKSZ=5000" { target { ! run_expensive_tests } } } */
-/* { dg-additional-options "-DCHUNKSZ=1000" { target run_expensive_tests } } */
+/* { dg-additional-options "-DCHUNKSZ=5000 -Wno-hsa" { target { ! run_expensive_tests } } } */
+/* { dg-additional-options "-DCHUNKSZ=1000 -Wno-hsa" { target run_expensive_tests } } */
 
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/examples-4/declare_target-3.c b/libgomp/testsuite/libgomp.c/examples-4/declare_target-3.c
index 8025335..2b906b0 100644
--- a/libgomp/testsuite/libgomp.c/examples-4/declare_target-3.c
+++ b/libgomp/testsuite/libgomp.c/examples-4/declare_target-3.c
@@ -1,4 +1,6 @@
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
+
 
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/examples-4/declare_target-4.c b/libgomp/testsuite/libgomp.c/examples-4/declare_target-4.c
index f241436..22a82af 100644
--- a/libgomp/testsuite/libgomp.c/examples-4/declare_target-4.c
+++ b/libgomp/testsuite/libgomp.c/examples-4/declare_target-4.c
@@ -1,5 +1,5 @@
 /* { dg-do run } */
-/* { dg-additional-options "-DTESTITERS=20" { target { ! run_expensive_tests } } } */
+/* { dg-additional-options "-DTESTITERS=20 -Wno-hsa" { target { ! run_expensive_tests } } } */
 
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/examples-4/declare_target-5.c b/libgomp/testsuite/libgomp.c/examples-4/declare_target-5.c
index 33d6137..99bcb55 100644
--- a/libgomp/testsuite/libgomp.c/examples-4/declare_target-5.c
+++ b/libgomp/testsuite/libgomp.c/examples-4/declare_target-5.c
@@ -1,4 +1,5 @@
 /* { dg-do run { target vect_simd_clones } } */
+/* { dg-additional-options "-Wno-hsa" } */
 /* { dg-additional-options "-msse2" { target sse2_runtime } } */
 /* { dg-additional-options "-mavx" { target avx_runtime } } */
 
diff --git a/libgomp/testsuite/libgomp.c/examples-4/target-1.c b/libgomp/testsuite/libgomp.c/examples-4/target-1.c
index 45adbe0..7ae3284 100644
--- a/libgomp/testsuite/libgomp.c/examples-4/target-1.c
+++ b/libgomp/testsuite/libgomp.c/examples-4/target-1.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/examples-4/target-2.c b/libgomp/testsuite/libgomp.c/examples-4/target-2.c
index 55d667a..c677d7e6 100644
--- a/libgomp/testsuite/libgomp.c/examples-4/target-2.c
+++ b/libgomp/testsuite/libgomp.c/examples-4/target-2.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/examples-4/target-3.c b/libgomp/testsuite/libgomp.c/examples-4/target-3.c
index 8d5125f..62d6d94 100644
--- a/libgomp/testsuite/libgomp.c/examples-4/target-3.c
+++ b/libgomp/testsuite/libgomp.c/examples-4/target-3.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/examples-4/target-4.c b/libgomp/testsuite/libgomp.c/examples-4/target-4.c
index 545f02a..711cda7 100644
--- a/libgomp/testsuite/libgomp.c/examples-4/target-4.c
+++ b/libgomp/testsuite/libgomp.c/examples-4/target-4.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/examples-4/target_data-1.c b/libgomp/testsuite/libgomp.c/examples-4/target_data-1.c
index 6b0331b..773ffab 100644
--- a/libgomp/testsuite/libgomp.c/examples-4/target_data-1.c
+++ b/libgomp/testsuite/libgomp.c/examples-4/target_data-1.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/examples-4/target_data-2.c b/libgomp/testsuite/libgomp.c/examples-4/target_data-2.c
index ee8f150..b5f408b 100644
--- a/libgomp/testsuite/libgomp.c/examples-4/target_data-2.c
+++ b/libgomp/testsuite/libgomp.c/examples-4/target_data-2.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/examples-4/target_data-3.c b/libgomp/testsuite/libgomp.c/examples-4/target_data-3.c
index 46b6740..a5b539d 100644
--- a/libgomp/testsuite/libgomp.c/examples-4/target_data-3.c
+++ b/libgomp/testsuite/libgomp.c/examples-4/target_data-3.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/examples-4/target_data-4.c b/libgomp/testsuite/libgomp.c/examples-4/target_data-4.c
index d2948ae..340793a 100644
--- a/libgomp/testsuite/libgomp.c/examples-4/target_data-4.c
+++ b/libgomp/testsuite/libgomp.c/examples-4/target_data-4.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/examples-4/target_update-1.c b/libgomp/testsuite/libgomp.c/examples-4/target_update-1.c
index 727d475..771d1c7 100644
--- a/libgomp/testsuite/libgomp.c/examples-4/target_update-1.c
+++ b/libgomp/testsuite/libgomp.c/examples-4/target_update-1.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/examples-4/target_update-2.c b/libgomp/testsuite/libgomp.c/examples-4/target_update-2.c
index 51262bb..b73fd1b 100644
--- a/libgomp/testsuite/libgomp.c/examples-4/target_update-2.c
+++ b/libgomp/testsuite/libgomp.c/examples-4/target_update-2.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/examples-4/teams-2.c b/libgomp/testsuite/libgomp.c/examples-4/teams-2.c
index 7d0a60e..a23fee4 100644
--- a/libgomp/testsuite/libgomp.c/examples-4/teams-2.c
+++ b/libgomp/testsuite/libgomp.c/examples-4/teams-2.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/examples-4/teams-3.c b/libgomp/testsuite/libgomp.c/examples-4/teams-3.c
index 092d386..8fe62c5 100644
--- a/libgomp/testsuite/libgomp.c/examples-4/teams-3.c
+++ b/libgomp/testsuite/libgomp.c/examples-4/teams-3.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/examples-4/teams-4.c b/libgomp/testsuite/libgomp.c/examples-4/teams-4.c
index d0c586c..035c30b 100644
--- a/libgomp/testsuite/libgomp.c/examples-4/teams-4.c
+++ b/libgomp/testsuite/libgomp.c/examples-4/teams-4.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/examples-4/teams-6.c b/libgomp/testsuite/libgomp.c/examples-4/teams-6.c
index 388582b..5286d37 100644
--- a/libgomp/testsuite/libgomp.c/examples-4/teams-6.c
+++ b/libgomp/testsuite/libgomp.c/examples-4/teams-6.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/for-3.c b/libgomp/testsuite/libgomp.c/for-3.c
index f4cd115..c70ef1a 100644
--- a/libgomp/testsuite/libgomp.c/for-3.c
+++ b/libgomp/testsuite/libgomp.c/for-3.c
@@ -1,4 +1,4 @@
-/* { dg-additional-options "-std=gnu99" } */
+/* { dg-additional-options "-std=gnu99 -Wno-hsa" } */
 
 extern void abort ();
 
diff --git a/libgomp/testsuite/libgomp.c/for-5.c b/libgomp/testsuite/libgomp.c/for-5.c
index 84e636a..2ccf47c 100644
--- a/libgomp/testsuite/libgomp.c/for-5.c
+++ b/libgomp/testsuite/libgomp.c/for-5.c
@@ -1,4 +1,4 @@
-/* { dg-additional-options "-std=gnu99" } */
+/* { dg-additional-options "-std=gnu99 -Wno-hsa" } */
 
 extern void abort ();
 
diff --git a/libgomp/testsuite/libgomp.c/for-6.c b/libgomp/testsuite/libgomp.c/for-6.c
index 7f3c65e..a55ce2e 100644
--- a/libgomp/testsuite/libgomp.c/for-6.c
+++ b/libgomp/testsuite/libgomp.c/for-6.c
@@ -1,4 +1,4 @@
-/* { dg-additional-options "-std=gnu99" } */
+/* { dg-additional-options "-std=gnu99 -Wno-hsa" } */
 
 extern void abort ();
 
diff --git a/libgomp/testsuite/libgomp.c/pr66199-2.c b/libgomp/testsuite/libgomp.c/pr66199-2.c
index 2fc9eec..413872d 100644
--- a/libgomp/testsuite/libgomp.c/pr66199-2.c
+++ b/libgomp/testsuite/libgomp.c/pr66199-2.c
@@ -1,5 +1,6 @@
 /* PR middle-end/66199 */
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #pragma omp declare target
 int u[1024], v[1024], w[1024];
diff --git a/libgomp/testsuite/libgomp.c/pr66199-4.c b/libgomp/testsuite/libgomp.c/pr66199-4.c
index a9b1bb8..319f916 100644
--- a/libgomp/testsuite/libgomp.c/pr66199-4.c
+++ b/libgomp/testsuite/libgomp.c/pr66199-4.c
@@ -1,6 +1,6 @@
 /* PR middle-end/66199 */
 /* { dg-do run } */
-/* { dg-options "-O2 -fopenmp" } */
+/* { dg-options "-O2 -fopenmp -Wno-hsa" } */
 
 #pragma omp declare target
 int u[1024], v[1024], w[1024];
diff --git a/libgomp/testsuite/libgomp.c/pr66199-5.c b/libgomp/testsuite/libgomp.c/pr66199-5.c
index 7ade43c..47acfbd 100644
--- a/libgomp/testsuite/libgomp.c/pr66199-5.c
+++ b/libgomp/testsuite/libgomp.c/pr66199-5.c
@@ -1,5 +1,6 @@
 /* PR middle-end/66199 */
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #pragma omp declare target
 int u[1024], v[1024], w[1024];
diff --git a/libgomp/testsuite/libgomp.c/pr66199-6.c b/libgomp/testsuite/libgomp.c/pr66199-6.c
index 6790f7d..ddddf11 100644
--- a/libgomp/testsuite/libgomp.c/pr66199-6.c
+++ b/libgomp/testsuite/libgomp.c/pr66199-6.c
@@ -1,6 +1,6 @@
 /* PR middle-end/66199 */
 /* { dg-do run } */
-/* { dg-options "-O2 -fopenmp" } */
+/* { dg-options "-O2 -fopenmp -Wno-hsa" } */
 
 #pragma omp declare target
 int u[1024], v[1024], w[1024];
diff --git a/libgomp/testsuite/libgomp.c/pr66199-7.c b/libgomp/testsuite/libgomp.c/pr66199-7.c
index 752367e..1ccccb0 100644
--- a/libgomp/testsuite/libgomp.c/pr66199-7.c
+++ b/libgomp/testsuite/libgomp.c/pr66199-7.c
@@ -1,5 +1,6 @@
 /* PR middle-end/66199 */
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #pragma omp declare target
 int u[1024], v[1024], w[1024];
diff --git a/libgomp/testsuite/libgomp.c/pr66199-8.c b/libgomp/testsuite/libgomp.c/pr66199-8.c
index 102af06..a6a32be 100644
--- a/libgomp/testsuite/libgomp.c/pr66199-8.c
+++ b/libgomp/testsuite/libgomp.c/pr66199-8.c
@@ -1,5 +1,6 @@
 /* PR middle-end/66199 */
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #pragma omp declare target
 int u[1024], v[1024], w[1024];
diff --git a/libgomp/testsuite/libgomp.c/pr66714.c b/libgomp/testsuite/libgomp.c/pr66714.c
index c9af4a9..6f0ca72 100644
--- a/libgomp/testsuite/libgomp.c/pr66714.c
+++ b/libgomp/testsuite/libgomp.c/pr66714.c
@@ -1,7 +1,7 @@
 /* { dg-do "compile" } */
 /* { dg-additional-options "--param ggc-min-expand=0" } */
 /* { dg-additional-options "--param ggc-min-heapsize=0" } */
-/* { dg-additional-options "-g" } */
+/* { dg-additional-options "-g -Wno-hsa" } */
 
 /* Minimized from on target-2.c.  */
 
diff --git a/libgomp/testsuite/libgomp.c/target-1.c b/libgomp/testsuite/libgomp.c/target-1.c
index c7abb00..533def6 100644
--- a/libgomp/testsuite/libgomp.c/target-1.c
+++ b/libgomp/testsuite/libgomp.c/target-1.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-Wno-hsa" } */
+
 extern
 #ifdef __cplusplus
 "C"
diff --git a/libgomp/testsuite/libgomp.c/target-16.c b/libgomp/testsuite/libgomp.c/target-16.c
index 7b0919b..19fcffb 100644
--- a/libgomp/testsuite/libgomp.c/target-16.c
+++ b/libgomp/testsuite/libgomp.c/target-16.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-Wno-hsa" } */
+
 extern void abort (void);
 
 void
diff --git a/libgomp/testsuite/libgomp.c/target-2.c b/libgomp/testsuite/libgomp.c/target-2.c
index 0ba766c..be8d877 100644
--- a/libgomp/testsuite/libgomp.c/target-2.c
+++ b/libgomp/testsuite/libgomp.c/target-2.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-Wno-hsa" } */
+
 extern
 #ifdef __cplusplus
 "C"
diff --git a/libgomp/testsuite/libgomp.c/target-31.c b/libgomp/testsuite/libgomp.c/target-31.c
index 8e63d28..8131ddc 100644
--- a/libgomp/testsuite/libgomp.c/target-31.c
+++ b/libgomp/testsuite/libgomp.c/target-31.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-Wno-hsa" } */
+
 #include <omp.h>
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/target-32.c b/libgomp/testsuite/libgomp.c/target-32.c
index 233877b..0c9b972 100644
--- a/libgomp/testsuite/libgomp.c/target-32.c
+++ b/libgomp/testsuite/libgomp.c/target-32.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-Wno-hsa" } */
+
 #include <stdlib.h>
 #include <unistd.h>
 
diff --git a/libgomp/testsuite/libgomp.c/target-35.c b/libgomp/testsuite/libgomp.c/target-35.c
index 6da8b2b..3818fa2 100644
--- a/libgomp/testsuite/libgomp.c/target-35.c
+++ b/libgomp/testsuite/libgomp.c/target-35.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-Wno-hsa" } */
+
 #include <omp.h>
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/target-5.c b/libgomp/testsuite/libgomp.c/target-5.c
index 4367443..4601c0c 100644
--- a/libgomp/testsuite/libgomp.c/target-5.c
+++ b/libgomp/testsuite/libgomp.c/target-5.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-Wno-hsa" } */
+
 #include <omp.h>
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/target-6.c b/libgomp/testsuite/libgomp.c/target-6.c
index ea35aa4..e3aa696 100644
--- a/libgomp/testsuite/libgomp.c/target-6.c
+++ b/libgomp/testsuite/libgomp.c/target-6.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-Wno-hsa" } */
+
 #include <omp.h>
 #include <stdlib.h>
 
diff --git a/libgomp/testsuite/libgomp.c/target-critical-1.c b/libgomp/testsuite/libgomp.c/target-critical-1.c
index 84ad558..6ce75c1 100644
--- a/libgomp/testsuite/libgomp.c/target-critical-1.c
+++ b/libgomp/testsuite/libgomp.c/target-critical-1.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #include <omp.h>
 #include <stdlib.h>
diff --git a/libgomp/testsuite/libgomp.c/target-teams-1.c b/libgomp/testsuite/libgomp.c/target-teams-1.c
index 8f591e0..b824eac 100644
--- a/libgomp/testsuite/libgomp.c/target-teams-1.c
+++ b/libgomp/testsuite/libgomp.c/target-teams-1.c
@@ -1,4 +1,5 @@
 /* { dg-do run } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #include <omp.h>
 #include <stdlib.h>
diff --git a/libgomp/testsuite/libgomp.c/thread-limit-2.c b/libgomp/testsuite/libgomp.c/thread-limit-2.c
index 1a97fb6..8b4c79c 100644
--- a/libgomp/testsuite/libgomp.c/thread-limit-2.c
+++ b/libgomp/testsuite/libgomp.c/thread-limit-2.c
@@ -1,5 +1,6 @@
 /* { dg-do run } */
 /* { dg-set-target-env-var OMP_THREAD_LIMIT "9" } */
+/* { dg-additional-options "-Wno-hsa" } */
 
 #include <stdlib.h>
 #include <unistd.h>
diff --git a/libgomp/testsuite/libgomp.c/thread-limit-3.c b/libgomp/testsuite/libgomp.c/thread-limit-3.c
index af9bd78..74a36e7 100644
--- a/libgomp/testsuite/libgomp.c/thread-limit-3.c
+++ b/libgomp/testsuite/libgomp.c/thread-limit-3.c
@@ -1,3 +1,5 @@
+/* { dg-additional-options "-Wno-hsa" } */
+
 #include <stdlib.h>
 #include <omp.h>
 
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/async_target-1.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/async_target-1.f90
index c3849de..263d570 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/async_target-1.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/async_target-1.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 module e_55_1_mod
   integer, parameter :: N = 100000, CHUNKSZ = 10000
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/async_target-2.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/async_target-2.f90
index b12b0ea..f5eb05a 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/async_target-2.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/async_target-2.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 ! { dg-require-effective-target offload_device }
 
 subroutine init (v1, v2, N)
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-2.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-2.f90
index 5bc900c..97aee81 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-2.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-2.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 program e_53_2
   !$omp declare target (fib)
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-3.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-3.f90
index fffbb7f..bc68176 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-3.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-3.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 module e_53_3_mod
   !$omp declare target (N, p, v1, v2)
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-4.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-4.f90
index 41d251a..9c5332a 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-4.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-4.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 module e_53_4_mod
   !$omp declare target (N, Q)
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-5.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-5.f90
index 06eae0a..874c818 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-5.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-5.f90
@@ -1,5 +1,5 @@
 ! { dg-do run { target vect_simd_clones } }
-! { dg-options "-O2" }
+! { dg-options "-O2 -Wno-hsa" }
 ! { dg-additional-options "-msse2" { target sse2_runtime } }
 ! { dg-additional-options "-mavx" { target avx_runtime } }
 
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/target-1.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/target-1.f90
index 76e9068..cdca19f 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/target-1.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/target-1.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 module e_50_1_mod
 contains
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/target-2.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/target-2.f90
index af469f4..df793c2 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/target-2.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/target-2.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 module e_50_2_mod
 contains
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/target-3.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/target-3.f90
index 9754704..7e23565 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/target-3.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/target-3.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 module e_50_3_mod
 contains
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/target-4.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/target-4.f90
index f94794e..f066e11 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/target-4.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/target-4.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 module e_50_4_mod
 contains
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/target_data-1.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/target_data-1.f90
index 98e5c0b..960b83d 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/target_data-1.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/target_data-1.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 module e_51_1_mod
 contains
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/target_data-2.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/target_data-2.f90
index 360cded..ee8f25a 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/target_data-2.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/target_data-2.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 module e_51_2_mod
 contains
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/target_data-3.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/target_data-3.f90
index a3d9c18..3afd5b7 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/target_data-3.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/target_data-3.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 module e_51_3_mod
 contains
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/target_data-4.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/target_data-4.f90
index e9de6ae..285acd1 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/target_data-4.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/target_data-4.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 module e_51_4_mod
 contains
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/target_data-5.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/target_data-5.f90
index 01a41ad..6c075c5 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/target_data-5.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/target_data-5.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 module e_51_5_mod
 contains
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/target_update-1.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/target_update-1.f90
index e23c0bb..40cf425 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/target_update-1.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/target_update-1.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 module e_52_1_mod
 contains
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/target_update-2.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/target_update-2.f90
index 3735e53..b7ed423 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/target_update-2.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/target_update-2.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 module e_52_2_mod
 contains
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/teams-2.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/teams-2.f90
index 6a83018..7a292af 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/teams-2.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/teams-2.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 function dotprod_ref (B, C, N) result (sum)
   implicit none
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/teams-3.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/teams-3.f90
index 9de77af..54b805a 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/teams-3.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/teams-3.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 function dotprod_ref (B, C, N) result (sum)
   implicit none
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/teams-4.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/teams-4.f90
index 8d4eb55..93a03fa 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/teams-4.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/teams-4.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 function dotprod_ref (B, C, N) result (sum)
   implicit none
diff --git a/libgomp/testsuite/libgomp.fortran/examples-4/teams-6.f90 b/libgomp/testsuite/libgomp.fortran/examples-4/teams-6.f90
index f791188..2ba15d9 100644
--- a/libgomp/testsuite/libgomp.fortran/examples-4/teams-6.f90
+++ b/libgomp/testsuite/libgomp.fortran/examples-4/teams-6.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 module e_54_6_mod
 contains
diff --git a/libgomp/testsuite/libgomp.fortran/nestedfn5.f90 b/libgomp/testsuite/libgomp.fortran/nestedfn5.f90
index f67bd47..105f6c7 100644
--- a/libgomp/testsuite/libgomp.fortran/nestedfn5.f90
+++ b/libgomp/testsuite/libgomp.fortran/nestedfn5.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
   interface
     subroutine bar (q)
diff --git a/libgomp/testsuite/libgomp.fortran/pr66199-2.f90 b/libgomp/testsuite/libgomp.fortran/pr66199-2.f90
index ad11ead..adae65b 100644
--- a/libgomp/testsuite/libgomp.fortran/pr66199-2.f90
+++ b/libgomp/testsuite/libgomp.fortran/pr66199-2.f90
@@ -1,6 +1,6 @@
 ! PR middle-end/66199
 ! { dg-do run }
-! { dg-options "-O2 -fopenmp" }
+! { dg-options "-O2 -fopenmp -Wno-hsa" }
 
   integer :: u(1024), v(1024), w(1024), a, b, c, d, e, a1, b1, a2, b2, d1, d2
   a = 1
diff --git a/libgomp/testsuite/libgomp.fortran/target1.f90 b/libgomp/testsuite/libgomp.fortran/target1.f90
index c70daac..48a66b7 100644
--- a/libgomp/testsuite/libgomp.fortran/target1.f90
+++ b/libgomp/testsuite/libgomp.fortran/target1.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 module target1
 contains
diff --git a/libgomp/testsuite/libgomp.fortran/target4.f90 b/libgomp/testsuite/libgomp.fortran/target4.f90
index aa2f0a5..cff339b 100644
--- a/libgomp/testsuite/libgomp.fortran/target4.f90
+++ b/libgomp/testsuite/libgomp.fortran/target4.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 module target4
 contains
diff --git a/libgomp/testsuite/libgomp.fortran/target5.f90 b/libgomp/testsuite/libgomp.fortran/target5.f90
index c46faf2..bc1f1e2 100644
--- a/libgomp/testsuite/libgomp.fortran/target5.f90
+++ b/libgomp/testsuite/libgomp.fortran/target5.f90
@@ -1,5 +1,5 @@
 ! { dg-do compile }
-! { dg-options "-fopenmp" }
+! { dg-options "-fopenmp -Wno-hsa" }
 
   integer :: r
   r = 0
diff --git a/libgomp/testsuite/libgomp.fortran/target6.f90 b/libgomp/testsuite/libgomp.fortran/target6.f90
index 13f5a52..956343f 100644
--- a/libgomp/testsuite/libgomp.fortran/target6.f90
+++ b/libgomp/testsuite/libgomp.fortran/target6.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
 module target6
 contains
diff --git a/libgomp/testsuite/libgomp.fortran/target7.f90 b/libgomp/testsuite/libgomp.fortran/target7.f90
index 0c977c4..94221b8 100644
--- a/libgomp/testsuite/libgomp.fortran/target7.f90
+++ b/libgomp/testsuite/libgomp.fortran/target7.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
   interface
     real function foo (x)
diff --git a/libgomp/testsuite/libgomp.fortran/target8.f90 b/libgomp/testsuite/libgomp.fortran/target8.f90
index 0564e90..83263d4 100644
--- a/libgomp/testsuite/libgomp.fortran/target8.f90
+++ b/libgomp/testsuite/libgomp.fortran/target8.f90
@@ -1,4 +1,5 @@
 ! { dg-do run }
+! { dg-additional-options "-Wno-hsa" }
 
   integer, parameter :: n = 1000
   integer, parameter :: c = 100
-- 
2.7.1

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [hsa, testsuite] Suppress hsa warnings in libgomp tests
  2016-02-26 16:00 [hsa, testsuite] Suppress hsa warnings in libgomp tests Martin Jambor
@ 2016-02-26 16:08 ` Jakub Jelinek
  2016-03-01 18:39   ` Martin Jambor
  0 siblings, 1 reply; 13+ messages in thread
From: Jakub Jelinek @ 2016-02-26 16:08 UTC (permalink / raw)
  To: GCC Patches

On Fri, Feb 26, 2016 at 04:59:57PM +0100, Martin Jambor wrote:
> just like with the compiler gomp testsuite, we need to add -Wno-hsa to
> options when compiling libgomp testcases in order not to have "excess
> errors" failures when HSA is enabled.  There are quite many of such
> testcases on the trunk because I have disabled the dynamic parallelism
> way of executing stuff.  Hopefully we'll be able to revert many of the
> hunks below when we get that working.
> 
> The patch has been tested both with and without HSA enabled.  OK for
> trunk?

I don't like this very much.
Couldn't you instead add -Wno-hsa next to -fopenmp in *.exp, and just where
you want to explicitly check the hsa warnings, enable it manually in
dg-options or dg-additional-options (it would need to be guarded with hsa
being enabled etc. anyway).

	Jakub

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [hsa, testsuite] Suppress hsa warnings in libgomp tests
  2016-02-26 16:08 ` Jakub Jelinek
@ 2016-03-01 18:39   ` Martin Jambor
  2016-03-01 18:48     ` Jakub Jelinek
  0 siblings, 1 reply; 13+ messages in thread
From: Martin Jambor @ 2016-03-01 18:39 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: GCC Patches

Hi,

On Fri, Feb 26, 2016 at 05:07:56PM +0100, Jakub Jelinek wrote:
> On Fri, Feb 26, 2016 at 04:59:57PM +0100, Martin Jambor wrote:
> > just like with the compiler gomp testsuite, we need to add -Wno-hsa to
> > options when compiling libgomp testcases in order not to have "excess
> > errors" failures when HSA is enabled.

...
> 
> I don't like this very much.
> Couldn't you instead add -Wno-hsa next to -fopenmp in *.exp, and just where
> you want to explicitly check the hsa warnings, enable it manually in
> dg-options or dg-additional-options (it would need to be guarded with hsa
> being enabled etc. anyway).
> 

as Jakub requested, this patch deals with HSA "excess errors" in the
libgomp library testsuite by passing -Wno-hsa to all of them.  IIUC,
that passing it in the second parameter of dg-runtest (as opposed to
the third) means that it will apply even tests that have their own
dg-options, which is presumably easier for everyone, provided that hsa
will get is own libgomp testsuite directories.

OK for trunk?

Thanks,

Martin

2016-02-29  Martin Jambor  <mjambor@suse.cz>

	* testsuite/libgomp.c/c.exp: Pass -Wno-hsa to all tests.
	* testsuite/libgomp.c++/c++.exp: Likewise.
	* testsuite/libgomp.fortran/fortran.exp: Likewise.
---
 libgomp/testsuite/libgomp.c++/c++.exp         | 2 +-
 libgomp/testsuite/libgomp.c/c.exp             | 2 +-
 libgomp/testsuite/libgomp.fortran/fortran.exp | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/libgomp/testsuite/libgomp.c++/c++.exp b/libgomp/testsuite/libgomp.c++/c++.exp
index 0454f95..120e573 100644
--- a/libgomp/testsuite/libgomp.c++/c++.exp
+++ b/libgomp/testsuite/libgomp.c++/c++.exp
@@ -65,7 +65,7 @@ if { $lang_test_file_found } {
     }
 
     # Main loop.
-    dg-runtest $tests "" "$libstdcxx_includes $DEFAULT_CFLAGS"
+    dg-runtest $tests "-Wno-hsa" "$libstdcxx_includes $DEFAULT_CFLAGS"
 }
 
 # All done.
diff --git a/libgomp/testsuite/libgomp.c/c.exp b/libgomp/testsuite/libgomp.c/c.exp
index 300b921..d3cd144 100644
--- a/libgomp/testsuite/libgomp.c/c.exp
+++ b/libgomp/testsuite/libgomp.c/c.exp
@@ -31,7 +31,7 @@ append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
 set_ld_library_path_env_vars
 
 # Main loop.
-dg-runtest $tests "" $DEFAULT_CFLAGS
+dg-runtest $tests "-Wno-hsa" $DEFAULT_CFLAGS
 
 # All done.
 dg-finish
diff --git a/libgomp/testsuite/libgomp.fortran/fortran.exp b/libgomp/testsuite/libgomp.fortran/fortran.exp
index 9e6b643..ea84d5c 100644
--- a/libgomp/testsuite/libgomp.fortran/fortran.exp
+++ b/libgomp/testsuite/libgomp.fortran/fortran.exp
@@ -66,7 +66,7 @@ if { $lang_test_file_found } {
     # For Fortran we're doing torture testing, as Fortran has far more tests
     # with arrays etc. that testing just -O0 or -O2 is insufficient, that is
     # typically not the case for C/C++.
-    gfortran-dg-runtest $tests "" ""
+    gfortran-dg-runtest $tests "-Wno-hsa" ""
 }
 
 # All done.
-- 
2.7.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [hsa, testsuite] Suppress hsa warnings in libgomp tests
  2016-03-01 18:39   ` Martin Jambor
@ 2016-03-01 18:48     ` Jakub Jelinek
  2016-03-01 19:08       ` Mike Stump
  2016-03-01 21:47       ` Martin Jambor
  0 siblings, 2 replies; 13+ messages in thread
From: Jakub Jelinek @ 2016-03-01 18:48 UTC (permalink / raw)
  To: GCC Patches

On Tue, Mar 01, 2016 at 07:39:18PM +0100, Martin Jambor wrote:
> as Jakub requested, this patch deals with HSA "excess errors" in the
> libgomp library testsuite by passing -Wno-hsa to all of them.  IIUC,
> that passing it in the second parameter of dg-runtest (as opposed to
> the third) means that it will apply even tests that have their own
> dg-options, which is presumably easier for everyone, provided that hsa
> will get is own libgomp testsuite directories.

What is the difference betwee the $flags and $default-extra-cflags
arguments to dg-runtest?  You seem to stick -Wno-hsa into the former,
which to me looks like it will be mentioned as part of the test
names (e.g. when cycling through -O* options, -Wno-hsa would be printed
along with -O2 etc.)?  Is there any reason not to stick it into the last
argument instead?

	Jakub

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [hsa, testsuite] Suppress hsa warnings in libgomp tests
  2016-03-01 18:48     ` Jakub Jelinek
@ 2016-03-01 19:08       ` Mike Stump
  2016-03-01 21:47       ` Martin Jambor
  1 sibling, 0 replies; 13+ messages in thread
From: Mike Stump @ 2016-03-01 19:08 UTC (permalink / raw)
  To: Jakub Jelinek, Martin Jambor; +Cc: GCC Patches

On Mar 1, 2016, at 10:47 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> What is the difference betwee the $flags and $default-extra-cflags
> arguments to dg-runtest?  You seem to stick -Wno-hsa into the former,
> which to me looks like it will be mentioned as part of the test
> names (e.g. when cycling through -O* options, -Wno-hsa would be printed
> along with -O2 etc.)?  Is there any reason not to stick it into the last
> argument instead?

Not including this option in the test case name sounds nicer.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [hsa, testsuite] Suppress hsa warnings in libgomp tests
  2016-03-01 18:48     ` Jakub Jelinek
  2016-03-01 19:08       ` Mike Stump
@ 2016-03-01 21:47       ` Martin Jambor
  2016-03-01 22:06         ` Jakub Jelinek
  1 sibling, 1 reply; 13+ messages in thread
From: Martin Jambor @ 2016-03-01 21:47 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: GCC Patches

Hi

On Tue, Mar 01, 2016 at 07:47:49PM +0100, Jakub Jelinek wrote:
> On Tue, Mar 01, 2016 at 07:39:18PM +0100, Martin Jambor wrote:
> > as Jakub requested, this patch deals with HSA "excess errors" in the
> > libgomp library testsuite by passing -Wno-hsa to all of them.  IIUC,
> > that passing it in the second parameter of dg-runtest (as opposed to
> > the third) means that it will apply even tests that have their own
> > dg-options, which is presumably easier for everyone, provided that hsa
> > will get is own libgomp testsuite directories.
> 
> What is the difference betwee the $flags and $default-extra-cflags
> arguments to dg-runtest?

well, exactly what I wrote in the original email and what you have
quoted (and me as well) above.  But let me quote the dejagnu source
comment of dg-runtest, which is perhaps more clear:

  # FLAGS is a set of options to always pass.
  # DEFAULT_EXTRA_FLAGS is a set of options to pass if the testcase
  # doesn't
  # specify any (with dg-option).

So if I changed DEFAULT_EXTRA_FLAGS rather than FLAGS, I'd have to go
through all testcases specifying dg-options and add -Wno-hsa there
too.  Moreover, we'd have to add -Wno-hsa to all appropriate future
testcases if they specify their own dg-options.

Perhaps we should be using dg-additional-options in libgomp testsuite
wherever possible but there certainly are testcases using dg-options.

> You seem to stick -Wno-hsa into the former,
> which to me looks like it will be mentioned as part of the test
> names (e.g. when cycling through -O* options, -Wno-hsa would be printed
> along with -O2 etc.)?

Yes, that is an unfortunate side-effect. Furthermore, automated
comparison scripts might be confused by the change (mine was,
reporting all testcases as newly passed/xfailed and old as
disappeared).

But again, I do not have a strong preference, I can change the patches
to use DEFAULT_EXTRA_FLAGS and am willing to be watching for fallout
and fixing dg-options if you prefer that.  So let me know what you
consider nicer and I'll do it.

Thanks,

Martin

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [hsa, testsuite] Suppress hsa warnings in libgomp tests
  2016-03-01 21:47       ` Martin Jambor
@ 2016-03-01 22:06         ` Jakub Jelinek
  2016-03-04 15:27           ` Martin Jambor
  0 siblings, 1 reply; 13+ messages in thread
From: Jakub Jelinek @ 2016-03-01 22:06 UTC (permalink / raw)
  To: GCC Patches

On Tue, Mar 01, 2016 at 10:47:46PM +0100, Martin Jambor wrote:
> well, exactly what I wrote in the original email and what you have
> quoted (and me as well) above.  But let me quote the dejagnu source
> comment of dg-runtest, which is perhaps more clear:
> 
>   # FLAGS is a set of options to always pass.
>   # DEFAULT_EXTRA_FLAGS is a set of options to pass if the testcase
>   # doesn't
>   # specify any (with dg-option).
> 
> So if I changed DEFAULT_EXTRA_FLAGS rather than FLAGS, I'd have to go
> through all testcases specifying dg-options and add -Wno-hsa there
> too.  Moreover, we'd have to add -Wno-hsa to all appropriate future
> testcases if they specify their own dg-options.

Ah, ok; what about adding
    # Disable HSA warnings by default.
    lappend ALWAYS_CFLAGS "additional_flags=-Wno-hsa"
in libgomp/testsuite/lib/libgomp.exp (next to e.g.
-fno-diagnostics-show-caret)?

	Jakub

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [hsa, testsuite] Suppress hsa warnings in libgomp tests
  2016-03-01 22:06         ` Jakub Jelinek
@ 2016-03-04 15:27           ` Martin Jambor
  2016-03-04 15:31             ` Jakub Jelinek
  0 siblings, 1 reply; 13+ messages in thread
From: Martin Jambor @ 2016-03-04 15:27 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: GCC Patches

Hi,

On Tue, Mar 01, 2016 at 11:06:43PM +0100, Jakub Jelinek wrote:
> On Tue, Mar 01, 2016 at 10:47:46PM +0100, Martin Jambor wrote:
> > well, exactly what I wrote in the original email and what you have
> > quoted (and me as well) above.  But let me quote the dejagnu source
> > comment of dg-runtest, which is perhaps more clear:
> > 
> >   # FLAGS is a set of options to always pass.
> >   # DEFAULT_EXTRA_FLAGS is a set of options to pass if the testcase
> >   # doesn't
> >   # specify any (with dg-option).
> > 
> > So if I changed DEFAULT_EXTRA_FLAGS rather than FLAGS, I'd have to go
> > through all testcases specifying dg-options and add -Wno-hsa there
> > too.  Moreover, we'd have to add -Wno-hsa to all appropriate future
> > testcases if they specify their own dg-options.
> 
> Ah, ok; what about adding
>     # Disable HSA warnings by default.
>     lappend ALWAYS_CFLAGS "additional_flags=-Wno-hsa"
> in libgomp/testsuite/lib/libgomp.exp (next to e.g.
> -fno-diagnostics-show-caret)?
> 

That works nicely (though I have to override it explicitely in the
libgomp.hsa.c directory with another -Whsa, but I guess we can live
with that).  So I will use the above for the libgomp case.

I have tried to come up with a similar alternative for
gcc.dg/gomp/gomp.exp, g++.dg/gomp/gomp.exp and gfortran/gomp/gomp.exp
but so far I have not achieved to make the C++ and Fortran cases work
in any other way but pass -Wno-hsa in FLAGS (and thus change the
name).  For C, adding the following before the main loop works, even
though it looks too much like a hack to me:

global TEST_ALWAYS_FLAGS
set TEST_ALWAYS_FLAGS [concat $TEST_ALWAYS_FLAGS "-Wno-hsa"]

However, the C++ and Fortran cases use gfortran-dg-runtest to cycle
through a set of torture options and I have not yet discovered the
right magic variable to set (for example, adding -Wno-hsa to
DG_TORTURE_OPTIONS elements does not work).

I'm afraid I have spent way too much time on this already, so unless
someone has any ideas, I'd suggest that we use the (already approved)
name-changing gomp patch as it is.  Or at least for C++ and Fortran.

Thanks,

Martin

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [hsa, testsuite] Suppress hsa warnings in libgomp tests
  2016-03-04 15:27           ` Martin Jambor
@ 2016-03-04 15:31             ` Jakub Jelinek
  2016-03-04 16:01               ` Martin Jambor
  0 siblings, 1 reply; 13+ messages in thread
From: Jakub Jelinek @ 2016-03-04 15:31 UTC (permalink / raw)
  To: GCC Patches

On Fri, Mar 04, 2016 at 04:27:11PM +0100, Martin Jambor wrote:
> > Ah, ok; what about adding
> >     # Disable HSA warnings by default.
> >     lappend ALWAYS_CFLAGS "additional_flags=-Wno-hsa"
> > in libgomp/testsuite/lib/libgomp.exp (next to e.g.
> > -fno-diagnostics-show-caret)?
> > 
> 
> That works nicely (though I have to override it explicitely in the
> libgomp.hsa.c directory with another -Whsa, but I guess we can live
> with that).  So I will use the above for the libgomp case.

Ok.

> I have tried to come up with a similar alternative for
> gcc.dg/gomp/gomp.exp, g++.dg/gomp/gomp.exp and gfortran/gomp/gomp.exp
> but so far I have not achieved to make the C++ and Fortran cases work
> in any other way but pass -Wno-hsa in FLAGS (and thus change the
> name).  For C, adding the following before the main loop works, even
> though it looks too much like a hack to me:
> 
> global TEST_ALWAYS_FLAGS
> set TEST_ALWAYS_FLAGS [concat $TEST_ALWAYS_FLAGS "-Wno-hsa"]

Doesn't this also cause the -Wno-hsa option on all further tests executed by
other *.exp after gomp.exp by the same runtest invocation?

> However, the C++ and Fortran cases use gfortran-dg-runtest to cycle
> through a set of torture options and I have not yet discovered the
> right magic variable to set (for example, adding -Wno-hsa to
> DG_TORTURE_OPTIONS elements does not work).
> 
> I'm afraid I have spent way too much time on this already, so unless
> someone has any ideas, I'd suggest that we use the (already approved)
> name-changing gomp patch as it is.  Or at least for C++ and Fortran.

Do you have URL for what you refer to?

	Jakub

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [hsa, testsuite] Suppress hsa warnings in libgomp tests
  2016-03-04 15:31             ` Jakub Jelinek
@ 2016-03-04 16:01               ` Martin Jambor
  2016-03-04 16:04                 ` Jakub Jelinek
  0 siblings, 1 reply; 13+ messages in thread
From: Martin Jambor @ 2016-03-04 16:01 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: GCC Patches

Hi,

On Fri, Mar 04, 2016 at 04:31:29PM +0100, Jakub Jelinek wrote:
> On Fri, Mar 04, 2016 at 04:27:11PM +0100, Martin Jambor wrote:
> > > Ah, ok; what about adding
> > >     # Disable HSA warnings by default.
> > >     lappend ALWAYS_CFLAGS "additional_flags=-Wno-hsa"
> > > in libgomp/testsuite/lib/libgomp.exp (next to e.g.
> > > -fno-diagnostics-show-caret)?
> > > 
> > 
> > That works nicely (though I have to override it explicitely in the
> > libgomp.hsa.c directory with another -Whsa, but I guess we can live
> > with that).  So I will use the above for the libgomp case.
> 
> Ok.
> 
> > I have tried to come up with a similar alternative for
> > gcc.dg/gomp/gomp.exp, g++.dg/gomp/gomp.exp and gfortran/gomp/gomp.exp
> > but so far I have not achieved to make the C++ and Fortran cases work
> > in any other way but pass -Wno-hsa in FLAGS (and thus change the
> > name).  For C, adding the following before the main loop works, even
> > though it looks too much like a hack to me:
> > 
> > global TEST_ALWAYS_FLAGS
> > set TEST_ALWAYS_FLAGS [concat $TEST_ALWAYS_FLAGS "-Wno-hsa"]
> 
> Doesn't this also cause the -Wno-hsa option on all further tests executed by
> other *.exp after gomp.exp by the same runtest invocation?
> 

Not in the limited runs that I experimented with so far, but I
certainly kept this possibility in mind too.  If so, I would either
set it back before invoking dg-finish or dismiss the whole idea.

> > However, the C++ and Fortran cases use gfortran-dg-runtest to cycle
> > through a set of torture options and I have not yet discovered the
> > right magic variable to set (for example, adding -Wno-hsa to
> > DG_TORTURE_OPTIONS elements does not work).
> > 
> > I'm afraid I have spent way too much time on this already, so unless
> > someone has any ideas, I'd suggest that we use the (already approved)
> > name-changing gomp patch as it is.  Or at least for C++ and Fortran.
> 
> Do you have URL for what you refer to?
> 

Sure, the patch has been posted here:

https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00071.html

and approved here:

https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00074.html

Martin

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [hsa, testsuite] Suppress hsa warnings in libgomp tests
  2016-03-04 16:01               ` Martin Jambor
@ 2016-03-04 16:04                 ` Jakub Jelinek
  2016-03-04 17:36                   ` Martin Jambor
  0 siblings, 1 reply; 13+ messages in thread
From: Jakub Jelinek @ 2016-03-04 16:04 UTC (permalink / raw)
  To: GCC Patches

On Fri, Mar 04, 2016 at 05:01:34PM +0100, Martin Jambor wrote:
> Not in the limited runs that I experimented with so far, but I
> certainly kept this possibility in mind too.  If so, I would either
> set it back before invoking dg-finish or dismiss the whole idea.
> 
> > > However, the C++ and Fortran cases use gfortran-dg-runtest to cycle
> > > through a set of torture options and I have not yet discovered the
> > > right magic variable to set (for example, adding -Wno-hsa to
> > > DG_TORTURE_OPTIONS elements does not work).
> > > 
> > > I'm afraid I have spent way too much time on this already, so unless
> > > someone has any ideas, I'd suggest that we use the (already approved)
> > > name-changing gomp patch as it is.  Or at least for C++ and Fortran.
> > 
> > Do you have URL for what you refer to?
> > 
> 
> Sure, the patch has been posted here:
> 
> https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00071.html

For the g*.dg/gomp/, if you'd only move -Wno-hsa into the last argument
next to -fopenmp, how many tests would be affected?  If not really many,
perhaps those could be changed to use dg-additional-options instead of
dg-options.

	Jakub

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [hsa, testsuite] Suppress hsa warnings in libgomp tests
  2016-03-04 16:04                 ` Jakub Jelinek
@ 2016-03-04 17:36                   ` Martin Jambor
  2016-03-04 17:39                     ` Jakub Jelinek
  0 siblings, 1 reply; 13+ messages in thread
From: Martin Jambor @ 2016-03-04 17:36 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: GCC Patches

On Fri, Mar 04, 2016 at 05:04:31PM +0100, Jakub Jelinek wrote:
> On Fri, Mar 04, 2016 at 05:01:34PM +0100, Martin Jambor wrote:
> > Not in the limited runs that I experimented with so far, but I
> > certainly kept this possibility in mind too.  If so, I would either
> > set it back before invoking dg-finish or dismiss the whole idea.
> > 
> > > > However, the C++ and Fortran cases use gfortran-dg-runtest to cycle
> > > > through a set of torture options and I have not yet discovered the
> > > > right magic variable to set (for example, adding -Wno-hsa to
> > > > DG_TORTURE_OPTIONS elements does not work).
> > > > 
> > > > I'm afraid I have spent way too much time on this already, so unless
> > > > someone has any ideas, I'd suggest that we use the (already approved)
> > > > name-changing gomp patch as it is.  Or at least for C++ and Fortran.
> > > 
> > > Do you have URL for what you refer to?
> > > 
> > 
> > Sure, the patch has been posted here:
> > 
> > https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00071.html
> 
> For the g*.dg/gomp/, if you'd only move -Wno-hsa into the last argument
> next to -fopenmp, how many tests would be affected?

Out of 287 files that have dg-options with them in the gomp
directories, only 9 generate hsa warnings:

  c-c++-common/gomp/clauses-1.c:/* { dg-options "-fopenmp" } */
  c-c++-common/gomp/if-1.c:/* { dg-options "-fopenmp" } */
  c-c++-common/gomp/pr61486-2.c:/* { dg-options "-fopenmp" } */
  c-c++-common/gomp/target-teams-1.c:/* { dg-options "-fopenmp -fdump-tree-gimple" } */
  g++.dg/gomp/target-teams-1.C:// { dg-options "-fopenmp -fdump-tree-gimple" }
  gcc.dg/gomp/pr68128-2.c:/* { dg-options "-O2 -fopenmp -fdump-tree-omplower" } */
  gfortran.dg/gomp/target1.f90:! { dg-options "-fopenmp" }
  gfortran.dg/gomp/target2.f90:! { dg-options "-fopenmp -ffree-line-length-160" }
  gfortran.dg/gomp/target3.f90:! { dg-options "-fopenmp" }

> If not really many,
> perhaps those could be changed to use dg-additional-options instead of
> dg-options.

I do not know what -ffree-line-length-160 is, but probably all of
them, even though putting -O2 in gcc.dg/gomp/pr68128-2.c to
"additional" flags feels just wrong.

However, the real question is: Would such a solution really be much
better than the first version of the patch
(https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01813.html)?  After
all, in comparison it would only avoid touching two tests and it will
not avoid issues with tests added in future if they use dg-options.

Martin

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [hsa, testsuite] Suppress hsa warnings in libgomp tests
  2016-03-04 17:36                   ` Martin Jambor
@ 2016-03-04 17:39                     ` Jakub Jelinek
  0 siblings, 0 replies; 13+ messages in thread
From: Jakub Jelinek @ 2016-03-04 17:39 UTC (permalink / raw)
  To: GCC Patches

On Fri, Mar 04, 2016 at 06:12:09PM +0100, Martin Jambor wrote:
> > For the g*.dg/gomp/, if you'd only move -Wno-hsa into the last argument
> > next to -fopenmp, how many tests would be affected?
> 
> Out of 287 files that have dg-options with them in the gomp
> directories, only 9 generate hsa warnings:
> 
>   c-c++-common/gomp/clauses-1.c:/* { dg-options "-fopenmp" } */
>   c-c++-common/gomp/if-1.c:/* { dg-options "-fopenmp" } */
>   c-c++-common/gomp/pr61486-2.c:/* { dg-options "-fopenmp" } */
>   c-c++-common/gomp/target-teams-1.c:/* { dg-options "-fopenmp -fdump-tree-gimple" } */
>   g++.dg/gomp/target-teams-1.C:// { dg-options "-fopenmp -fdump-tree-gimple" }
>   gcc.dg/gomp/pr68128-2.c:/* { dg-options "-O2 -fopenmp -fdump-tree-omplower" } */
>   gfortran.dg/gomp/target1.f90:! { dg-options "-fopenmp" }
>   gfortran.dg/gomp/target2.f90:! { dg-options "-fopenmp -ffree-line-length-160" }
>   gfortran.dg/gomp/target3.f90:! { dg-options "-fopenmp" }
> 
> > If not really many,
> > perhaps those could be changed to use dg-additional-options instead of
> > dg-options.
> 
> I do not know what -ffree-line-length-160 is, but probably all of
> them, even though putting -O2 in gcc.dg/gomp/pr68128-2.c to
> "additional" flags feels just wrong.

{ dg-options "-fopenmp" }
can go, that should be the default.
And, I'm fine with moving the -fdump-tree-*, -O2 and -ffree-line-length-160
to dg-additional-options.

I think I prefer it that way.

	Jakub

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-03-04 17:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-26 16:00 [hsa, testsuite] Suppress hsa warnings in libgomp tests Martin Jambor
2016-02-26 16:08 ` Jakub Jelinek
2016-03-01 18:39   ` Martin Jambor
2016-03-01 18:48     ` Jakub Jelinek
2016-03-01 19:08       ` Mike Stump
2016-03-01 21:47       ` Martin Jambor
2016-03-01 22:06         ` Jakub Jelinek
2016-03-04 15:27           ` Martin Jambor
2016-03-04 15:31             ` Jakub Jelinek
2016-03-04 16:01               ` Martin Jambor
2016-03-04 16:04                 ` Jakub Jelinek
2016-03-04 17:36                   ` Martin Jambor
2016-03-04 17:39                     ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).