public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kwok Cheung Yeung <kcy@codesourcery.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>,
	Thomas Schwinge <thomas@codesourcery.com>
Cc: Jakub Jelinek <jakub@redhat.com>
Subject: [PATCH] [og10] Fix goacc/routine-4-extern.c test
Date: Wed, 22 Jul 2020 14:38:04 +0100	[thread overview]
Message-ID: <07709f66-bf60-c95f-bee3-2d24adc492aa@codesourcery.com> (raw)

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

This test fails due to expected warnings and errors not being emitted by GCC. 
The problem is that the 'gang reduction on an orphan loop' error is caught very 
early on in the frontends (c/c-typeck.c and cp/semantics.c), so the compiler 
aborts before getting to the tree passes that emit the missing warnings/errors.

This error handling was introduced by the patch 'Various OpenACC reduction 
enhancements - FE changes' (commit 6b3e1f7f05cd360bbd356b3f78511aa2ec3f40c3), 
but the later patch to fix affected testcases 'Various OpenACC reduction 
enhancements - test cases' (commit 6a0b5806b24bfdefe0b0f3ccbcc51299e5195dca) did 
not include a fix for routine-4-extern.c.

This patch removes the now outdated dg-error and dg-warnings from the test. Okay 
for OG10?

Kwok

[-- Attachment #2: 0002-Fix-failures-in-c-c-common-goacc-routine-4-extern.c-.patch --]
[-- Type: text/plain, Size: 2590 bytes --]

From 5774f048563df311f2a35a654b8c2d7b1af9f2da Mon Sep 17 00:00:00 2001
From: Kwok Cheung Yeung <kcy@codesourcery.com>
Date: Thu, 18 Jun 2020 14:31:17 -0700
Subject: [PATCH 2/6] Fix failures in c-c++-common/goacc/routine-4-extern.c
 testcase

2020-07-21  Kwok Cheung Yeung  <kcy@codesourcery.com>

	gcc/testsuite/
	* c-c++-common/goacc/routine-4-extern.c (seq, vector, worker): Remove
	obsolete expected warnings and errors.
---
 gcc/testsuite/c-c++-common/goacc/routine-4-extern.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/gcc/testsuite/c-c++-common/goacc/routine-4-extern.c b/gcc/testsuite/c-c++-common/goacc/routine-4-extern.c
index c23ddcf..5f8372c 100644
--- a/gcc/testsuite/c-c++-common/goacc/routine-4-extern.c
+++ b/gcc/testsuite/c-c++-common/goacc/routine-4-extern.c
@@ -21,14 +21,14 @@ void vector (void);
 #pragma acc routine seq
 void seq (void)
 {
-  extern_gang ();  /* { dg-error "routine call uses" } */
-  extern_worker ();  /* { dg-error "routine call uses" } */
-  extern_vector ();  /* { dg-error "routine call uses" } */
+  extern_gang ();
+  extern_worker ();
+  extern_vector ();
   extern_seq ();
 
   int red;
 
-#pragma acc loop reduction (+:red) // { dg-warning "insufficient partitioning" }
+#pragma acc loop reduction (+:red)
   for (int i = 0; i < 10; i++)
     red ++;
 
@@ -36,19 +36,19 @@ void seq (void)
   for (int i = 0; i < 10; i++)
     red ++;
 
-#pragma acc loop worker reduction (+:red) // { dg-error "disallowed by containing routine" }
+#pragma acc loop worker reduction (+:red)
   for (int i = 0; i < 10; i++)
     red ++;
 
-#pragma acc loop vector reduction (+:red) // { dg-error "disallowed by containing routine" }
+#pragma acc loop vector reduction (+:red)
   for (int i = 0; i < 10; i++)
     red ++;
 }
 
 void vector (void)
 {
-  extern_gang ();  /* { dg-error "routine call uses" } */
-  extern_worker ();  /* { dg-error "routine call uses" } */
+  extern_gang ();
+  extern_worker ();
   extern_vector ();
   extern_seq ();
 
@@ -62,7 +62,7 @@ void vector (void)
   for (int i = 0; i < 10; i++)
     red ++;
 
-#pragma acc loop worker reduction (+:red) // { dg-error "disallowed by containing routine" }
+#pragma acc loop worker reduction (+:red)
   for (int i = 0; i < 10; i++)
     red ++;
 
@@ -73,7 +73,7 @@ void vector (void)
 
 void worker (void)
 {
-  extern_gang ();  /* { dg-error "routine call uses" } */
+  extern_gang ();
   extern_worker ();
   extern_vector ();
   extern_seq ();
-- 
2.8.1


         reply	other threads:[~2020-07-22 13:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-02  1:32 [gomp4] Make OpenACC orphan gang reductions errors Cesar Philippidis
2020-07-07  8:52 ` [PATCH] [og10] libgomp, Fortran: Fix OpenACC "gang reduction on an orphan loop" error message Frederik Harwath
2020-07-07 10:42   ` Thomas Schwinge
2020-07-07 12:39     ` Frederik Harwath
2020-07-20 10:26     ` Frederik Harwath
2021-11-30 12:12       ` Thomas Schwinge
2020-07-22 13:38 ` Kwok Cheung Yeung [this message]
2020-07-24  7:27   ` [PATCH] [og10] Fix goacc/routine-4-extern.c test Thomas Schwinge
2020-07-26 13:05     ` Kwok Cheung Yeung
2020-07-28  8:44       ` Thomas Schwinge
2021-11-30 12:01         ` Thomas Schwinge
2021-11-30 12:05 ` [gomp4] Make OpenACC orphan gang reductions errors Thomas Schwinge
2021-11-30 12:10 ` Thomas Schwinge
2021-11-30 12:13 ` Thomas Schwinge
     [not found] ` <b24ef83b-a7b4-f7f1-915c-bbe7bd99f877@mentor.com>
     [not found]   ` <83eadd47-9619-3e48-41ca-861ace07eacb@mentor.com>
2021-11-30 12:20     ` Gang-level reductions in OpenACC routine 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=07709f66-bf60-c95f-bee3-2d24adc492aa@codesourcery.com \
    --to=kcy@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=thomas@codesourcery.com \
    /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).