public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Frederik Harwath <frederik@codesourcery.com>
To: <gcc-patches@gcc.gnu.org>, <thomas@codesourcery.com>,
	<tobias@codesourcery.com>
Cc: <jakub@redhat.com>
Subject: [PATCH 1/2] Use clause locations in OpenACC nested reduction warnings
Date: Tue, 10 Dec 2019 14:23:00 -0000	[thread overview]
Message-ID: <20191210142303.9948-2-frederik@codesourcery.com> (raw)
In-Reply-To: <0624ce85-2ee7-38eb-d115-509d600d3f20@codesourcery.com>

Since the Fortran front-end now sets the clause locations correctly, we can
emit warnings with more precise locations if we encounter conflicting
operations for a variable in reduction clauses.

2019-12-10  Frederik Harwath  <frederik@codesourcery.com>

gcc/
	* omp-low.c (scan_omp_for): Use clause location in warning.
---
 gcc/omp-low.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index ad26f7918a5..d422c205836 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -2473,7 +2473,7 @@ scan_omp_for (gomp_for *stmt, omp_context *outer_ctx)
 	      tree_code outer_op = OMP_CLAUSE_REDUCTION_CODE (outer_clause);
 	      if (outer_var == local_var && outer_op != local_op)
 		{
-		  warning_at (gimple_location (stmt), 0,
+		  warning_at (OMP_CLAUSE_LOCATION (local_clause), 0,
 			      "conflicting reduction operations for %qE",
 			      local_var);
 		  inform (OMP_CLAUSE_LOCATION (outer_clause),
-- 
2.17.1

  parent reply	other threads:[~2019-12-10 14:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04 13:38 [Patch, Fortran] PR 92793 - fix column used for error diagnostic Tobias Burnus
2019-12-04 14:30 ` Harwath, Frederik
2019-12-06  8:02 ` *PING* – " Tobias Burnus
2019-12-06 16:42   ` Janne Blomqvist
2019-12-09 15:58 ` [PATCH] Fix column information for omp_clauses in Fortran code Harwath, Frederik
2019-12-09 16:03   ` Tobias Burnus
2019-12-10 14:23   ` Frederik Harwath [this message]
2019-12-10 14:23   ` [PATCH 2/2] Add tests to verify OpenACC clause locations Frederik Harwath
2019-12-10 14:23   ` [PATCH 0/2] " Frederik Harwath
2019-12-10 14:44     ` Thomas Schwinge
2019-12-10 15:12       ` Harwath, Frederik
2019-12-10 16:22       ` Harwath, Frederik
2019-12-11  8:38         ` [PATCH, committed] Fix PR92901: Change test expectation for C++ in OpenACC test clause-locations.c Harwath, Frederik
2020-11-03  8:17     ` [PATCH 0/2] Add tests to verify OpenACC clause locations Thomas Schwinge
2020-11-03 21:34       ` Thomas Schwinge
2020-11-03  8:26   ` [PATCH] Fix column information for omp_clauses in Fortran code Thomas Schwinge
2020-10-30 10:35 ` [Patch, Fortran] PR 92793 - fix column used for error diagnostic Thomas Schwinge
2020-10-30 10:47   ` Thomas Schwinge
2020-10-30 11:16     ` Tobias Burnus
2020-11-02 13:43       ` 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=20191210142303.9948-2-frederik@codesourcery.com \
    --to=frederik@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=thomas@codesourcery.com \
    --cc=tobias@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).