From patchwork Sat Oct 27 10:30:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 989871 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-488453-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=netcologne.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="lEsLirer"; dkim=pass (2048-bit key; unprotected) header.d=netcologne.de header.i=@netcologne.de header.b="gMZ27P4M"; 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 42hxx56kjqzB2xb for ; Sat, 27 Oct 2018 21:31:34 +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:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=lSX0dvWdS2bpU+t4P51CKhO9BKIHz8tmqWqVQ5COoBIEUfKXhB 9Q94xzAiHitSdXcAd5wkYKVB7cVSnMsRq44G2mP2JcD7UFXiRHE74UuSuKlC3nRl HQOUaM3a5NfyxodV1zwL1dWMMLDLVOBkAnpHl5OaSoY62xQ1BeDwcirzM= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=B9zxidexHAFxRGlS9TPFdI+eF10=; b=lEsLirer0vfx0cxzoEZL 2TDSadLVsxX8/nSP83rM2Wvh6bCUSBTxoc2pYXQH+J+2Kob8ne10intDF5EYf/CD 2P9P2DcNW2cu2Y6+Kt15CulILAwZAp/Cp8tQOjqul6Swm2aCqkmNZPAz+MtUFL9B juR1+P4V0V02qHNpauzJe7E= Received: (qmail 11122 invoked by alias); 27 Oct 2018 10:31:20 -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 10751 invoked by uid 89); 27 Oct 2018 10:30:57 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=265502, *walk_subtrees, Hx-languages-length:1681, forgetting X-HELO: cc-smtpout3.netcologne.de Received: from cc-smtpout3.netcologne.de (HELO cc-smtpout3.netcologne.de) (89.1.8.213) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 27 Oct 2018 10:30:52 +0000 Received: from cc-smtpin2.netcologne.de (cc-smtpin2.netcologne.de [89.1.8.202]) by cc-smtpout3.netcologne.de (Postfix) with ESMTP id 4862F1253C; Sat, 27 Oct 2018 12:30:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=netcologne.de; s=nc1116a; t=1540636247; bh=18sPnUts22E7Tw8qRc04b4tzo7QVYMJbIq2XnscedRE=; h=To:From:Subject:Message-ID:Date:From; b=gMZ27P4MdiTsSqwj2I914tY6R3LWh0BXnUjb9Olyj2ZAMSO0GW5ELewPXh7l3Elhi p7HdmikPUt6QsPo4MIpTrJmDNvuBCSi5WpvA+vGpYDcBC+s0eSY5jrjwXIkt/VABc/ H4J2xR5IVriq70pJuL8OSfWWVEHYhIZiGqOAD8u44O1wHpYSGvC8OxyaW6upxrooSC d7j2czST2lN24c8UgRgFidONKkwc9iOj/Yz8+lC/f0IP/1d1LCUGm3Kmf9EGIKeVyr Zi3b0CQavSsR+P6RfVHf4I2NG2hJ3ANRTdoijvnbrwpbe1e0OJmZTsALGxg9nfWeWO oIX6/Pn7zKuxg== Received: from localhost (localhost [127.0.0.1]) by cc-smtpin2.netcologne.de (Postfix) with ESMTP id 4513C11D80; Sat, 27 Oct 2018 12:30:47 +0200 (CEST) Received: from [78.35.147.109] (helo=cc-smtpin2.netcologne.de) by localhost with ESMTP (eXpurgate 4.6.0) (envelope-from ) id 5bd43e57-01b0-7f0000012729-7f000001ca76-1 for ; Sat, 27 Oct 2018 12:30:47 +0200 Received: from [192.168.178.68] (xdsl-78-35-147-109.netcologne.de [78.35.147.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by cc-smtpin2.netcologne.de (Postfix) with ESMTPSA; Sat, 27 Oct 2018 12:30:46 +0200 (CEST) To: "fortran@gcc.gnu.org" , gcc-patches From: Thomas Koenig Subject: [patch, fortran, committed] Clarify warning on missing location information Message-ID: Date: Sat, 27 Oct 2018 12:30:45 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 Originally, the idea about checking for missing location information when not configured for release is to catch errors when adding new code, so forgetting to add the info will show up right away on regression testing. From time to time, a user can stumble across something like that and get a confusing error message. This tries to make sure people don't mistake this for their own error. Committed as obvious, r265559. No test case because... well, this is not supposed to happen in the first place. Regards Thomas 2018-10-27 Thomas Koenig PR fortran/86907 * frontend-passes.c (check_locus_code): Add information that warning about missing location information points to an inconsisten internal state. (check_locus_expr): Likewise. Index: frontend-passes.c =================================================================== --- frontend-passes.c (Revision 265502) +++ frontend-passes.c (Arbeitskopie) @@ -190,7 +190,8 @@ check_locus_code (gfc_code **c, int *walk_subtrees { current_code = c; if (c && *c && (((*c)->loc.nextc == NULL) || ((*c)->loc.lb == NULL))) - gfc_warning_internal (0, "No location in statement"); + gfc_warning_internal (0, "Inconsistent internal state: " + "No location in statement"); return 0; } @@ -205,7 +206,8 @@ check_locus_expr (gfc_expr **e, int *walk_subtrees { if (e && *e && (((*e)->where.nextc == NULL || (*e)->where.lb == NULL))) - gfc_warning_internal (0, "No location in expression near %L", + gfc_warning_internal (0, "Inconsistent internal state: " + "No location in expression near %L", &((*current_code)->loc)); return 0; }