diff mbox

[gomp4] remove xfails in the libgomp reduction tests

Message ID 55E75FD3.4000009@codesourcery.com
State New
Headers show

Commit Message

Cesar Philippidis Sept. 2, 2015, 8:45 p.m. UTC
A couple of reduction tests inside libgomp had xfails because Julian
added those tests before my reduction patches were ready. Most of them
should pass unmodified, but I had to found a bug in
loop-reduction-wv-p-3.c, where a private variable was used without being
initialized. This patch fixes that bug and removes the xfails from the
reduction test cases.

This patch has been committed to gomp-4_0-branch.

Cesar
diff mbox

Patch

2015-09-02  Cesar Philippidis  <cesar@codesourcery.com>

	libgomp/
	* testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-2.c:
	Remove xfail.
	* testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-3.c:
	Likwise.
	* testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-4.c:
	Remove xfail.
	* testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-2.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-3.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-4.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-3.c:
	Likewise.  Initialize res because it's private.


diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-2.c
index 3e5c707..ea5c151 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-2.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-2.c
@@ -1,5 +1,3 @@ 
-/* { dg-xfail-run-if "TODO" { openacc_nvidia_accel_selected } { "*" } { "" } } */
-
 #include <assert.h>
 
 /* Test of reduction on loop directive (gangs, workers and vectors, non-private
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-3.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-3.c
index 44d7f0f..0056f3c 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-3.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-3.c
@@ -1,5 +1,3 @@ 
-/* { dg-xfail-run-if "TODO" { openacc_nvidia_accel_selected } { "*" } { "" } } */
-
 #include <assert.h>
 
 /* Test of reduction on loop directive (gangs, workers and vectors, non-private
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-4.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-4.c
index 8bc18f7..e69d0ec 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-4.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-gwv-np-4.c
@@ -1,5 +1,3 @@ 
-/* { dg-xfail-run-if "TODO" { *-*-* } { "*" } { "" } } */
-
 #include <assert.h>
 
 /* Test of reduction on loop directive (gangs, workers and vectors, multiple
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-2.c
index 63f3fef..15f0053 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-2.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-vector-p-2.c
@@ -1,5 +1,3 @@ 
-/* { dg-xfail-run-if "TODO" { openacc_nvidia_accel_selected } { "*" } { "" } } */
-
 #include <assert.h>
 
 /* Test of reduction on loop directive (vector reduction in
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-3.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-3.c
index ac96525..b5e28fb 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-3.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-reduction-wv-p-3.c
@@ -1,5 +1,3 @@ 
-/* { dg-xfail-run-if "TODO" { *-*-* } { "*" } { "" } } */
-
 #include <assert.h>
 
 /* Test of reduction on loop directive (workers and vectors, private reduction
@@ -16,6 +14,9 @@  main (int argc, char *argv[])
   #pragma acc parallel num_gangs(32) num_workers(32) vector_length(32) \
 		       private(res) copyin(arr) copyout(out)
   {
+    /* Private variables aren't initialized by default in openacc.  */
+    res = 0;
+
     /* "res" should be available at the end of the following loop (and should
        have the same value redundantly in each gang).  */
     #pragma acc loop worker vector reduction(+:res)
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-3.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-3.c
index 860e56d..9b26f9b 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-3.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-3.c
@@ -1,5 +1,3 @@ 
-/* { dg-xfail-run-if "TODO" { *-*-* } { "*" } { "" } } */
-
 #include <assert.h>
 
 /* Test of reduction on both parallel and loop directives (workers and vectors
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-4.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-4.c
index 41e0f71..38e63e3 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-4.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-4.c
@@ -1,5 +1,3 @@ 
-/* { dg-xfail-run-if "TODO" { *-*-* } { "*" } { "" } } */
-
 #include <assert.h>
 
 /* Test of reduction on both parallel and loop directives (workers and vectors