From patchwork Tue Dec 10 14:23:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederik Harwath X-Patchwork-Id: 1207112 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-515606-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="LaSVwTFD"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47XMkH5Jmyz9sPh for ; Wed, 11 Dec 2019 01:23:51 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; q=dns; s=default; b=P3mqkKgTZtXeg74y eSrX9mOdvAuA3BpP8EuLYTVlKU4f5ntGg7wvGcAavmlpwjoejRKehEd3kDGgZ3/N Wl21hQKQwIEBsdkBHcNFuyXjqvF50fME2Myb5HOyBun52wse+xspkkMVHc6yNQp8 X0QVjyPADGgfq+HsCZzsuMccGH0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type; s=default; bh=X+V0RwWYp9A1G0bDEWOLRT SYxds=; b=LaSVwTFDiWFmV0yAAEJpxJQatCBUO3ffJ/nVLyMDpZPmh8iOThDFOx GWMdP+EFfIIReMqRbSRQ57KyS4YJMDTOv+GW53UlntGUblctZ/G1Vp1PTSjQbsVR RAgPJ4tYDrlPHD3J295KfKNmhNSdPgsQ9JGSMz5+MiA0xOQNcDpJc= Received: (qmail 80918 invoked by alias); 10 Dec 2019 14:23:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 80883 invoked by uid 89); 10 Dec 2019 14:23:34 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: esa1.mentor.iphmx.com Received: from esa1.mentor.iphmx.com (HELO esa1.mentor.iphmx.com) (68.232.129.153) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 10 Dec 2019 14:23:32 +0000 IronPort-SDR: F1I6b/fk3uJg/5lVKTcbwdb7/ywcoCYaFVIEfRd39xxNTcNvpIWueAYAdxPm5YMrAroqqYdUq6 vUWuyQ3EaleEQy/BvguY21L/TbRo72ojauCuGiCS2qr6sdzGPJVv3SQycmeLA79vMB8srZdHUf 22ha32OBccQiaWiFbkPo0bxFHkryua3si0+oZF7Eimil6QKMWJjmE6l9AFfbpqdVotwyNhkwDy EJ1Mw4rJ9VFd3H1kR0MIoVI76oXMWB/frDecuGJ4vU48P31SjBXpgWp+GuVJDu+CJN+ZdqcKrg QqQ= Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 10 Dec 2019 06:23:32 -0800 IronPort-SDR: xXR6KGYjYdDYOgYZd4JaLP4fxaUYQ8F9b0C/ft8k50PtMu2wwiqDL2/F+CCUZIkfX3JF7Xrvkl guVp2noy3ECGw9g/A9n1QFsJuiLSG8Tz+RNoDqgwr/Kv9Drbnt9tsBNU2MMhqACyIBQk5sKu3N FsRg3SD0dk5OIc02IYX/MslsABhvOuoqQouPOF7HUATou+eAhoHr//uRK6Mv9h8Gb+FSzHcL8e fg3q7x7bdVN6BPY0xiCnnmL4uodUt8totEfJVJ9IALdxP7fJ+HToF4eDglYnIvIgOXmvGKGUl2 CYQ= From: Frederik Harwath To: , , CC: Subject: [PATCH 1/2] Use clause locations in OpenACC nested reduction warnings Date: Tue, 10 Dec 2019 15:23:02 +0100 Message-ID: <20191210142303.9948-2-frederik@codesourcery.com> In-Reply-To: <0624ce85-2ee7-38eb-d115-509d600d3f20@codesourcery.com> References: <0624ce85-2ee7-38eb-d115-509d600d3f20@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes 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 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),