From patchwork Fri Oct 27 10:19:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Vehreschild X-Patchwork-Id: 831177 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-465313-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="NOPkaql7"; 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 3yNfxM37T8z9t2d for ; Fri, 27 Oct 2017 21:19:19 +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:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=qyqmzalI6RtEQ9qtEi7UgZV2MCXyy+aqn5DPIT/4ppuLT610TVQnS 1sdBRrxpKtBkF520jCraZyp2gzWaFwQ/khFFQfWmGe8i2PwUvvvmBK2IoU1ZHoCX PEZm1nAKFY2SXxzc18pvWJD1dEIWE6bIBmiwjg+gG60dmeFwMP5X2E= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=QIs6Rk7RE6vDWB9SNVNJ0m2VYK0=; b=NOPkaql7bmqW8mHGh+oj 94i+i5JIosXMoVOT+R8F5Fdn+8s1MTzVJZ6QAnW70VPU+64YRtv7eOnPdb/SHA7R OS86v1pQis6FtJIBvZUQaoHFKOCjyRCEc71H2Voi8nff0cFejT0ETFrHF/ZuLzR+ rMTKm+wJySYz+rKKP2EmZXo= Received: (qmail 66102 invoked by alias); 27 Oct 2017 10:19:08 -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 66083 invoked by uid 89); 27 Oct 2017 10:19:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.6 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=H*F:D*gmx.de X-Spam-User: qpsmtpd, 2 recipients X-HELO: mout.gmx.net Received: from mout.gmx.net (HELO mout.gmx.net) (212.227.15.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 27 Oct 2017 10:19:06 +0000 Received: from vepi2 ([88.77.167.231]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0M5tof-1dEyKc2bov-00xunu; Fri, 27 Oct 2017 12:19:03 +0200 Date: Fri, 27 Oct 2017 12:19:02 +0200 From: Andre Vehreschild To: GCC-Patches-ML , GCC-Fortran-ML Subject: [PATCH, Fortran, v1] Clarify error message of co_reduce Message-ID: <20171027121847.2dd8906e@vepi2> MIME-Version: 1.0 X-UI-Out-Filterresults: notjunk:1; V01:K0:BXnXTT6T0iE=:SuCrxAXjf7c/bgj+4BArjv 84rRc1nEB3/6gw+da/T2KWznSlP7bINyfFEMqBBnUBDKKS20K6ro2ZEXB9oM3aCK3L0C1SgMP Z63tRw+PLvX2B/Wv5ZXxVs1hbBRRwRQPvo0K+A8C9RlDQoirgss+JT6cvVlvfbGhCOlDb54O/ iPDuPGk6A7fsCwAyPquILrs3BHKPOdoRk0w+r4FyaorhNPpO2JjmBX01E66+u3LZd5uofOL9d KdYUndB6zxJDI4jpJcQXPkGV8A64/jeyPxpf7YWzQXXbHgh9u488akipDcuiAOEPAMSnXfbi8 jFx1iYzQYAedVC23ERnZU70my/xfvbvOzHLx5TWcKxVeFQcjdzCz+gWD7ePTOKLRT3xxa4HGJ myq/Uo5jCnWeua6RC0wqo+0mLly14/dwlkB/MJeVK1yYI5cr2dQmUPBbdpAbH26TUcN3iTLfb MdSHIw4vtRMWKvuJHdYxnzKnlbuyWJYE9sBQDtiFKVCI5Q8ZM0zekLFr4UkE0kx2RXFeCPiFG hF67giDV0Q4I5M34Hul0veKyPHYeFxiTUXzSJsgSbaGmB3XeIEJjZAHVD+iFD1axxiepoUh0U onYdr/OkXzTCT++pvXI/yZ5P1tfQCPL+Ofd6OACMqYc+sfOxUO12oeuB4ZTABhwR16oEt4djj r+qigh2jvob4fkgdMW6gPrweS38+/fie82ymNi47hBLwSopGQPEuMOovf3WN//umgghhLXob+ pWlWSEMnjnokKiygFiaNprr4DqarAEKnmpjHT5+hxhMZY1Sy13K51B9QaFMMfA3HGDwHuiQ4e LufeR55MRhDMirTz8+Vf7v5ZwiMYg== Hi all, as noted on IRC is one of the error message in check.c co_reduce misleading. The attached patch fixes this. The intention of the error message is to tell that the type of the argument bound to parameter A is of wrong type and not that an unspecific argument has a wrong type. If no one objects within 24 h I am planning to commit this patch as obvious to trunk gcc-7. Bootstrapped and regtested on x86_64-linux-gnu/f25. Regards, Andre diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index 681950e..759c15a 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -1731,7 +1731,7 @@ gfc_check_co_reduce (gfc_expr *a, gfc_expr *op, gfc_expr *result_image, if (!gfc_compare_types (&a->ts, &sym->result->ts)) { - gfc_error ("A argument at %L has type %s but the function passed as " + gfc_error ("The A argument at %L has type %s but the function passed as " "OPERATOR at %L returns %s", &a->where, gfc_typename (&a->ts), &op->where, gfc_typename (&sym->result->ts));