From patchwork Tue Nov 1 10:58:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 80323 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp563214qge; Tue, 1 Nov 2016 03:58:42 -0700 (PDT) X-Received: by 10.98.220.10 with SMTP id t10mr21325297pfg.47.1477997922000; Tue, 01 Nov 2016 03:58:42 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id e6si29881905pgi.135.2016.11.01.03.58.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Nov 2016 03:58:41 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-440026-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-440026-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-440026-patch=linaro.org@gcc.gnu.org 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=OPcspq1KA0nn1VomdE9YvFrfgWi2xlvMhg5McsxXGS7NDYfgZB h9R5rT8Um8Bh7Y4TzUFwL///Xf+JGYCXhE/EGClJRrUzJWKTUQHKyzu7x/oTMQWH 3sJsCpAVPIO/WojIZy67OIN1whkjlQqr2kEcq6n+vmeDrEdttgqmu1PWw= 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=ryGSIh6MBBJEsQiKtrRlI7wFfNo=; b=fYmZrPtMDA4/yMkH/OMF rgLXyM5q2wZAN8FQ5rFLC7jlqQLs/7nIfhkLMu6wi7KaN7XDXYkBibIyIy6jCn0U Wui+SAUkaWSD2HcxvIY6n2eMZD/XsNAGtwuVpEcG0Y3wGCIiGL1eGeyt6s87fKgR l90ts1XSY/enr9Dhh45ltI0= Received: (qmail 39171 invoked by alias); 1 Nov 2016 10:58:28 -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 39146 invoked by uid 89); 1 Nov 2016 10:58:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.1 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=2016-11-01, ij 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; Tue, 01 Nov 2016 10:58:17 +0000 Received: from cc-smtpin1.netcologne.de (cc-smtpin1.netcologne.de [89.1.8.201]) by cc-smtpout3.netcologne.de (Postfix) with ESMTP id B1899128BD; Tue, 1 Nov 2016 11:58:13 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cc-smtpin1.netcologne.de (Postfix) with ESMTP id ACE8C11E2D; Tue, 1 Nov 2016 11:58:13 +0100 (CET) Received: from [78.35.160.94] (helo=cc-smtpin1.netcologne.de) by localhost with ESMTP (eXpurgate 4.1.9) (envelope-from ) id 58187545-0c14-7f0000012729-7f000001eabc-1 for ; Tue, 01 Nov 2016 11:58:13 +0100 Received: from [192.168.178.20] (xdsl-78-35-160-94.netcologne.de [78.35.160.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by cc-smtpin1.netcologne.de (Postfix) with ESMTPSA; Tue, 1 Nov 2016 11:58:11 +0100 (CET) To: "fortran@gcc.gnu.org" , gcc-patches From: Thomas Koenig Subject: [patch, fortran] Fix PR 69544 Message-ID: Date: Tue, 1 Nov 2016 11:58:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 Hello world, the attached, rather simple, patch, fixes a regression where the locus was not set, leading to an ICE on a warning. Regression-tested on trunk. OK on all affected and open branches (7/6/5)? Regards Thomas 2016-11-01 Thomas Koenig PR fortran/69544 * match.c (gfc_match_where): Fill in locus for assigment in simple WHERE statement. 2016-11-01 Thomas Koenig PR fortran/69544 * gfortran.dg/where_5.f90: New test. Index: match.c =================================================================== --- match.c (Revision 241590) +++ match.c (Arbeitskopie) @@ -6265,8 +6265,12 @@ gfc_match_where (gfc_statement *st) c = gfc_get_code (EXEC_WHERE); c->expr1 = expr; + /* Put in the assignment. It will not be processed by add_statement, so we + need to copy the location here. */ + c->next = XCNEW (gfc_code); *c->next = new_st; + c->next->loc = gfc_current_locus; gfc_clear_new_st (); new_st.op = EXEC_WHERE;