public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nathan Sidwell <nathan@acm.org>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: [gomp4] fortran testcase
Date: Sun, 18 Oct 2015 23:20:00 -0000	[thread overview]
Message-ID: <56240637.6040601@acm.org> (raw)

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

This fortran testcase was passing by not testing what it thought it was testing. 
  The loop over which the reduction is specified  is not partitioned, and hence 
the reduction was being elided.

Fixing that problem  turns out to be more involved, and a distraction from 
completing the patch series I'm working on (which exposed this problem).

I've adjusted the testcase to specify a partitioning, and marked the test as 
xfailing.

nathan

[-- Attachment #2: gomp4-red-test.patch --]
[-- Type: text/x-patch, Size: 833 bytes --]

2015-10-18  Nathan Sidwell  <nathan@codesourcery.com>

	* gfortran.dg/goacc/reduction-2.f95: Force loop partitioning and
	xfail.

Index: gcc/testsuite/gfortran.dg/goacc/reduction-2.f95
===================================================================
--- gcc/testsuite/gfortran.dg/goacc/reduction-2.f95	(revision 228954)
+++ gcc/testsuite/gfortran.dg/goacc/reduction-2.f95	(working copy)
@@ -1,4 +1,6 @@
-! { dg-do compile }
+! { dg-xfail-if "" { *-*-* } { "*" } { "" } }
+! { dg-excess-errors "internal compiler error" }
+! { dg-do compile  }
 
 program reduction
   integer, parameter    :: n = 40, c = 10
@@ -13,7 +15,7 @@ subroutine redsub(sum, n, c)
   sum = 0
 
   !$acc parallel vector_length(n) copyin (n, c)
-  !$acc loop reduction(+:sum)
+  !$acc loop vector reduction(+:sum)
   do i = 1, n
      sum = sum + c
   end do

         reply	other threads:[~2015-10-18 20:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-02 16:10 [0/3] OpenACC reductions Nathan Sidwell
2015-10-18 23:20 ` Nathan Sidwell [this message]
2015-11-02 16:18 ` [1/3] " Nathan Sidwell
2015-11-03 15:46   ` Jakub Jelinek
2015-11-03 16:02     ` Nathan Sidwell
2015-11-04 10:31       ` Jakub Jelinek
2015-11-04 13:58         ` Nathan Sidwell
2015-11-04 14:08           ` Jakub Jelinek
2015-11-04  9:59   ` Jakub Jelinek
2015-11-06 10:47   ` [gomp4] " Thomas Schwinge
2016-01-07  3:55     ` [gomp4] private reductions Cesar Philippidis
2016-01-07 16:53       ` Cesar Philippidis
2016-01-09  1:14       ` Cesar Philippidis
2016-01-11 12:10       ` Thomas Schwinge
2016-01-11 14:55         ` Cesar Philippidis
2021-08-09 11:37   ` [1/3] OpenACC reductions Thomas Schwinge
2015-11-02 16:35 ` [2/3] " Nathan Sidwell
2015-11-04 10:01   ` Jakub Jelinek
2015-11-04 13:57     ` Nathan Sidwell
2015-11-04 13:27   ` Bernd Schmidt
2015-11-04 14:09     ` Nathan Sidwell
2015-11-04 16:59     ` Nathan Sidwell
2015-11-06 10:48       ` [gomp4] " Thomas Schwinge
2015-11-02 16:38 ` [3/3] " Nathan Sidwell
2015-11-04 10:03   ` Jakub Jelinek
2015-11-06 10:49   ` [gomp4] " Thomas Schwinge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56240637.6040601@acm.org \
    --to=nathan@acm.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).