From patchwork Wed Mar 22 15:25:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 742146 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3vpD6L1LLFz9s2s for ; Thu, 23 Mar 2017 02:26:00 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="e159EAhg"; dkim-atps=neutral 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=jpkL5vc1B86UybhqpcwyTdhGXwXDS5Z1VcIAfdnwuHQB0vhyKX GhqbiobsUK0kNuOFyruA17kOdL2m16G5vbJo6zqouyBYZfT+MiWMIBmfALBopkhY bmOwptGL+J8DvXtbMTjrd3UJT90mOMYYgusrJLX5EXWFl2kwrqSLkOie8= 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=8o6c2MzppNqAKTkFGOkceQLKnn0=; b=e159EAhg7XRLpQ5RS/qf NC3pN5sDX6lCMhoOGYxUZ8X0ZzxOiLt/4s5sLAEKIJpoc/asnnvEG0c710TUejAm pAnbrRx8X+NAKr0qMQYGI1h7crPdmh8INoVyE6FukUIgFimabvUBW3uIjHjymU/F LePUZ9u1BRtUx35Vnu0nxPI= Received: (qmail 92434 invoked by alias); 22 Mar 2017 15:25:46 -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 90670 invoked by uid 89); 22 Mar 2017 15:25:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:sk:tkoenig, UD:netcologne.de X-Spam-User: qpsmtpd, 2 recipients 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; Wed, 22 Mar 2017 15:25:42 +0000 Received: from cc-smtpin3.netcologne.de (cc-smtpin3.netcologne.de [89.1.8.203]) by cc-smtpout3.netcologne.de (Postfix) with ESMTP id 85D22127DE; Wed, 22 Mar 2017 16:25:39 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cc-smtpin3.netcologne.de (Postfix) with ESMTP id 8277711DEC; Wed, 22 Mar 2017 16:25:39 +0100 (CET) Received: from [78.35.130.229] (helo=cc-smtpin3.netcologne.de) by localhost with ESMTP (eXpurgate 4.1.9) (envelope-from ) id 58d29773-0242-7f0000012729-7f000001ce44-1 for ; Wed, 22 Mar 2017 16:25:39 +0100 Received: from [192.168.178.20] (xdsl-78-35-130-229.netcologne.de [78.35.130.229]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by cc-smtpin3.netcologne.de (Postfix) with ESMTPSA; Wed, 22 Mar 2017 16:25:38 +0100 (CET) To: "fortran@gcc.gnu.org" , gcc-patches From: Thomas Koenig Subject: [patch, fortran, committed] Fix PR 80162, warning about missing location information Message-ID: <9e02af5d-5657-b967-1474-eaeee9ccfb64@netcologne.de> Date: Wed, 22 Mar 2017 16:25:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 Hello world, I have committed the attached patch as obvious and simple after regression-testing, as rev. 246388. This is a case where the location checking pass did its job and found a place where the location information was indeed missing. Regards Thomas 2017-03-22 Thomas Koenig PR fortran/80142 * frontend-passes.c (combine_array_constructor): Take location of new expression from constructor expression instead of constructor. 2017-03-22 Thomas Koenig PR fortran/80142 * gfortran.dg/any_loc.f90: New test case. Index: frontend-passes.c =================================================================== --- frontend-passes.c (Revision 245760) +++ frontend-passes.c (Arbeitskopie) @@ -1381,7 +1381,7 @@ combine_array_constructor (gfc_expr *e) new_expr->ts = e->ts; new_expr->expr_type = EXPR_OP; new_expr->rank = c->expr->rank; - new_expr->where = c->where; + new_expr->where = c->expr->where; new_expr->value.op.op = e->value.op.op; if (scalar_first)