This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] fix an openacc reduction test for PR68242
- From: Cesar Philippidis <cesar at codesourcery dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 13 Apr 2016 09:05:22 -0700
- Subject: [patch] fix an openacc reduction test for PR68242
- Authentication-results: sourceware.org; auth=none
As stated in PR68242, the OpenACC libgomp reduction test reduction-2.c
has one test case involving a multiplication reduction which overflows
and that results in a failure on i686-linux host targets. This patch
adjusts the reduction size to prevent the overflow from happening. I've
also adjusted reduction-1.c because it can also overflow.
This patch has been tested on i686-linux and x86_64-linux. I'll apply
this patch to trunk as obvious shortly.
Cesar
2016-04-13 Cesar Philippidis <cesar@codesourcery.com>
libgomp/
PR testsuite/68242
* testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Adjust test.
* testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise.
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-1.c
index 10eb278..e8a8911 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-1.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-1.c
@@ -15,7 +15,7 @@ const int vl = 32;
static void
test_reductions (void)
{
- const int n = 100;
+ const int n = 10;
int i;
int array[n];
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-2.c
index 7cb9497..d19b1c8 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-2.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-2.c
@@ -15,7 +15,7 @@ const int vl = 32;
static void
test_reductions (void)
{
- const int n = 100;
+ const int n = 10;
int i;
float array[n];