public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] fix an openacc reduction test for PR68242
@ 2016-04-13 16:05 Cesar Philippidis
  0 siblings, 0 replies; only message in thread
From: Cesar Philippidis @ 2016-04-13 16:05 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 459 bytes --]

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

[-- Attachment #2: pr68242.diff --]
[-- Type: text/x-patch, Size: 1097 bytes --]

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];
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-04-13 16:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-13 16:05 [patch] fix an openacc reduction test for PR68242 Cesar Philippidis

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).