diff mbox

[hsa,testsuite] Suppress hsa warnings in compiler gomp tests

Message ID 20160226155919.GH3094@virgil.suse.cz
State New
Headers show

Commit Message

Martin Jambor Feb. 26, 2016, 3:59 p.m. UTC
Hi,

compilation of (some) target constructs in the following testcases
fails and the warning the compiler gives out by default are then
reported as excess errors.  There are two options how to deal with
them.  Either we can change the gomp.exp files to pass -Wno-hsa as the
default set of options and then override it in the tests which we want
to be compiled also to HSAIL, or disable it explicitely only in the
tests where we know about the warnings.  Both approaches work.

I have selected the second option so that if we regress in the sense
that we fail to produce an HSAIL for a test for which we could do it
earlier, I can detect it and examine the issue.  The explicit -Wno-hsa
options are added by the patch below, which has been tested both with
and without HSA.  OK for trunk?

Thanks,

Martin

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

testsuite/
	* c-c++-common/gomp/clauses-1.c: Add -Wno-hsa option.
	* c-c++-common/gomp/if-1.c: Likewise.
	* c-c++-common/gomp/nesting-1.c: Likewise.
	* c-c++-common/gomp/nesting-warn-1.c: Likewise.
	* c-c++-common/gomp/pr61486-2.c: Likewise.
	* c-c++-common/gomp/target-teams-1.c: Likewise.
	* g++.dg/gomp/target-teams-1.C: Likewise.
	* gcc.dg/gomp/pr68128-2.c: Likewise.
	* gfortran.dg/gomp/target1.f90: Likewise.
	* gfortran.dg/gomp/target2.f90: Likewise.
	* gfortran.dg/gomp/target3.f90: Likewise.
---
 gcc/testsuite/c-c++-common/gomp/clauses-1.c      | 2 +-
 gcc/testsuite/c-c++-common/gomp/if-1.c           | 2 +-
 gcc/testsuite/c-c++-common/gomp/nesting-1.c      | 2 ++
 gcc/testsuite/c-c++-common/gomp/nesting-warn-1.c | 2 ++
 gcc/testsuite/c-c++-common/gomp/pr61486-2.c      | 2 +-
 gcc/testsuite/c-c++-common/gomp/target-teams-1.c | 2 +-
 gcc/testsuite/g++.dg/gomp/target-teams-1.C       | 2 +-
 gcc/testsuite/gcc.dg/gomp/pr68128-2.c            | 2 +-
 gcc/testsuite/gfortran.dg/gomp/target1.f90       | 2 +-
 gcc/testsuite/gfortran.dg/gomp/target2.f90       | 2 +-
 gcc/testsuite/gfortran.dg/gomp/target3.f90       | 2 +-
 11 files changed, 13 insertions(+), 9 deletions(-)
diff mbox

Patch

diff --git a/gcc/testsuite/c-c++-common/gomp/clauses-1.c b/gcc/testsuite/c-c++-common/gomp/clauses-1.c
index 2d1c352..8eb514d 100644
--- a/gcc/testsuite/c-c++-common/gomp/clauses-1.c
+++ b/gcc/testsuite/c-c++-common/gomp/clauses-1.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-fopenmp" } */
+/* { dg-options "-fopenmp -Wno-hsa" } */
 /* { dg-additional-options "-std=c99" { target c } } */
 
 int t;
diff --git a/gcc/testsuite/c-c++-common/gomp/if-1.c b/gcc/testsuite/c-c++-common/gomp/if-1.c
index 4ba708c..3a2862f 100644
--- a/gcc/testsuite/c-c++-common/gomp/if-1.c
+++ b/gcc/testsuite/c-c++-common/gomp/if-1.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-fopenmp" } */
+/* { dg-options "-fopenmp -Wno-hsa" } */
 
 void
 foo (int a, int b, int *p, int *q)
diff --git a/gcc/testsuite/c-c++-common/gomp/nesting-1.c b/gcc/testsuite/c-c++-common/gomp/nesting-1.c
index 61b2f81..395f9d7 100644
--- a/gcc/testsuite/c-c++-common/gomp/nesting-1.c
+++ b/gcc/testsuite/c-c++-common/gomp/nesting-1.c
@@ -1,3 +1,5 @@ 
+/* { dg-options "-fopenmp -Wno-hsa" } */
+
 extern int i;
 
 void
diff --git a/gcc/testsuite/c-c++-common/gomp/nesting-warn-1.c b/gcc/testsuite/c-c++-common/gomp/nesting-warn-1.c
index 800ad53..30d037b 100644
--- a/gcc/testsuite/c-c++-common/gomp/nesting-warn-1.c
+++ b/gcc/testsuite/c-c++-common/gomp/nesting-warn-1.c
@@ -1,3 +1,5 @@ 
+/* { dg-options "-fopenmp -Wno-hsa" } */
+
 extern int i;
 
 void
diff --git a/gcc/testsuite/c-c++-common/gomp/pr61486-2.c b/gcc/testsuite/c-c++-common/gomp/pr61486-2.c
index db97143..009e224 100644
--- a/gcc/testsuite/c-c++-common/gomp/pr61486-2.c
+++ b/gcc/testsuite/c-c++-common/gomp/pr61486-2.c
@@ -1,6 +1,6 @@ 
 /* PR middle-end/61486 */
 /* { dg-do compile } */
-/* { dg-options "-fopenmp" } */
+/* { dg-options "-fopenmp -Wno-hsa" } */
 /* { dg-require-effective-target alloca } */
 
 #pragma omp declare target
diff --git a/gcc/testsuite/c-c++-common/gomp/target-teams-1.c b/gcc/testsuite/c-c++-common/gomp/target-teams-1.c
index 0a707c2..94c997f 100644
--- a/gcc/testsuite/c-c++-common/gomp/target-teams-1.c
+++ b/gcc/testsuite/c-c++-common/gomp/target-teams-1.c
@@ -1,5 +1,5 @@ 
 /* { dg-do compile } */
-/* { dg-options "-fopenmp -fdump-tree-gimple" } */
+/* { dg-options "-fopenmp -fdump-tree-gimple -Wno-hsa" } */
 
 int v = 6;
 void bar (int);
diff --git a/gcc/testsuite/g++.dg/gomp/target-teams-1.C b/gcc/testsuite/g++.dg/gomp/target-teams-1.C
index 0a97de0..7e2ba39 100644
--- a/gcc/testsuite/g++.dg/gomp/target-teams-1.C
+++ b/gcc/testsuite/g++.dg/gomp/target-teams-1.C
@@ -1,5 +1,5 @@ 
 // { dg-do compile }
-// { dg-options "-fopenmp -fdump-tree-gimple" }
+// { dg-options "-fopenmp -fdump-tree-gimple -Wno-hsa" }
 
 int v = 6;
 void bar (int);
diff --git a/gcc/testsuite/gcc.dg/gomp/pr68128-2.c b/gcc/testsuite/gcc.dg/gomp/pr68128-2.c
index 58a07e9..6cdb9d4 100644
--- a/gcc/testsuite/gcc.dg/gomp/pr68128-2.c
+++ b/gcc/testsuite/gcc.dg/gomp/pr68128-2.c
@@ -1,6 +1,6 @@ 
 /* PR tree-optimization/68128 */
 /* { dg-do compile } */
-/* { dg-options "-O2 -fopenmp -fdump-tree-omplower" } */
+/* { dg-options "-O2 -fopenmp -fdump-tree-omplower -Wno-hsa" } */
 
 extern int omp_get_thread_num (void);
 extern int omp_get_ancestor_thread_num (int);
diff --git a/gcc/testsuite/gfortran.dg/gomp/target1.f90 b/gcc/testsuite/gfortran.dg/gomp/target1.f90
index 14db497..3ef3d3a 100644
--- a/gcc/testsuite/gfortran.dg/gomp/target1.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/target1.f90
@@ -1,5 +1,5 @@ 
 ! { dg-do compile }
-! { dg-options "-fopenmp" }
+! { dg-options "-fopenmp -Wno-hsa" }
 
 module target1
   interface
diff --git a/gcc/testsuite/gfortran.dg/gomp/target2.f90 b/gcc/testsuite/gfortran.dg/gomp/target2.f90
index 7521331..7aea28a 100644
--- a/gcc/testsuite/gfortran.dg/gomp/target2.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/target2.f90
@@ -1,5 +1,5 @@ 
 ! { dg-do compile }
-! { dg-options "-fopenmp -ffree-line-length-160" }
+! { dg-options "-fopenmp -ffree-line-length-160 -Wno-hsa" }
 
 subroutine foo (n, s, t, u, v, w)
   integer :: n, i, s, t, u, v, w
diff --git a/gcc/testsuite/gfortran.dg/gomp/target3.f90 b/gcc/testsuite/gfortran.dg/gomp/target3.f90
index 7ba42a0..532f13c 100644
--- a/gcc/testsuite/gfortran.dg/gomp/target3.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/target3.f90
@@ -1,5 +1,5 @@ 
 ! { dg-do compile }
-! { dg-options "-fopenmp" }
+! { dg-options "-fopenmp -Wno-hsa" }
 
 subroutine foo (r)
   integer :: i, r