From patchwork Sun Nov 6 12:29:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 80961 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp566953qge; Sun, 6 Nov 2016 04:30:22 -0800 (PST) X-Received: by 10.99.19.71 with SMTP id 7mr3275148pgt.38.1478435422305; Sun, 06 Nov 2016 04:30:22 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id 76si26557802pfo.238.2016.11.06.04.30.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Nov 2016 04:30:22 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-440534-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-440534-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-440534-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=RVDb8UmRw34M9lMZWwIpIN4u6WKQASzpDGxWfYNsys+iIA9Mmw BrKsOFMIPzleTdkuROH5xGUXHQglmQYCmsFZqcaXt6dHk98ucbEs8aE3emQZJjOT m8PjSk7VNmq7A1MyCxgBhHLSeNoOPg+uJABAjLqrxuCJMAYAhBh6wL0sU= 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=l5kTxdCw+gtdfQB5MQFDucmYA24=; b=TzYExuUiDWJVn8Q/S+9G vHH++5Q0e7smJjs4Fhr6WkAGtlVGc48WypdxUwbs8o5T4q1ckRGM1DKtVgntMW2J eWBDR42aRd9xpVWT29IVTO+BIWjtCH6m/8+eVzBuSfVYl2IgQ3yIkYjWQP0VJhtM O8ThT+9QdJ9kpMdzwISz+kg= Received: (qmail 92876 invoked by alias); 6 Nov 2016 12:30:01 -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 92750 invoked by uid 89); 6 Nov 2016 12:30:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.2 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:1289, H*Ad:U*tkoenig, 2016-11-06 X-Spam-User: qpsmtpd, 2 recipients X-HELO: cc-smtpout2.netcologne.de Received: from cc-smtpout2.netcologne.de (HELO cc-smtpout2.netcologne.de) (89.1.8.212) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 06 Nov 2016 12:29:50 +0000 Received: from cc-smtpin2.netcologne.de (cc-smtpin2.netcologne.de [89.1.8.202]) by cc-smtpout2.netcologne.de (Postfix) with ESMTP id 7871E12812; Sun, 6 Nov 2016 13:29:47 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cc-smtpin2.netcologne.de (Postfix) with ESMTP id 6F83911DFE; Sun, 6 Nov 2016 13:29:47 +0100 (CET) Received: from [78.35.164.158] (helo=cc-smtpin2.netcologne.de) by localhost with ESMTP (eXpurgate 4.1.9) (envelope-from ) id 581f223b-0c00-7f0000012729-7f000001ea9e-1 for ; Sun, 06 Nov 2016 13:29:47 +0100 Received: from [192.168.178.20] (xdsl-78-35-164-158.netcologne.de [78.35.164.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by cc-smtpin2.netcologne.de (Postfix) with ESMTPSA; Sun, 6 Nov 2016 13:29:46 +0100 (CET) To: "fortran@gcc.gnu.org" , gcc-patches From: Thomas Koenig Subject: [patch, fortran, committed] Fix PR 78221 Message-ID: Date: Sun, 6 Nov 2016 13:29:45 +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, I have committed the attached patch to the regression as obvious and simple after regression-testing. Will commit to gcc 6 in a few days. Regards Thomas 2016-11-06 Thomas Koenig PR fortran/78221 * arith.c (gfc_complex2real): Change gfc_warning_now to gfc_warning. 2016-11-06 Thomas Koenig PR fortran/78221 * gfortran.dg/warn_conversion_9.f90: New test. Index: arith.c =================================================================== --- arith.c (Revision 241747) +++ arith.c (Arbeitskopie) @@ -2369,10 +2369,10 @@ gfc_complex2real (gfc_expr *src, int kind) /* See if we discarded an imaginary part. */ if (mpfr_cmp_si (mpc_imagref (src->value.complex), 0) != 0) { - gfc_warning_now (w, "Non-zero imaginary part discarded " - "in conversion from %qs to %qs at %L", - gfc_typename(&src->ts), gfc_typename (&result->ts), - &src->where); + gfc_warning (w, "Non-zero imaginary part discarded " + "in conversion from %qs to %qs at %L", + gfc_typename(&src->ts), gfc_typename (&result->ts), + &src->where); did_warn = true; }