From patchwork Sun Sep 23 10:55:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 973657 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-486195-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="paizHdjH"; dkim=pass (2048-bit key; unprotected) header.d=netcologne.de header.i=@netcologne.de header.b="ajWlTZ4p"; 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 42J44Y0WZ4z9sBJ for ; Sun, 23 Sep 2018 20:55:39 +1000 (AEST) 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=o9p1dy/G3q6fGwBNm5JuIuDXphuAAyzF7uAZqfS+Gijb9qCQT+ bbhxYjhSm3rh/d90xH/CdW4511VVVuLrUzDDUctYYIoHrIOACdWyPkBX47myDcsd 4KMZ+M9jXOwscJ4eIw5UY3ApxoA3yCzqfGJAwNzECGaUcmzeK/+VoZhYI= 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=eYPzVy6gcygNzNg3sbZGYCLURuc=; b=paizHdjHhKyA0TfhP+Ml 0erOBvmdQQe/9HTtTQcujKkQ9KbJXDpG9RkjVoXdKQp1PscmLr/nGN2Zla25cg0D woU9C6EtaRC500PZPmb2p36X068UOyC9FcalfRbYVbXOhJsgE6wCBwENP5Wxx9lf pAKvVEAA9YpIhDvSJPwrz5A= Received: (qmail 123710 invoked by alias); 23 Sep 2018 10:55:27 -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 123686 invoked by uid 89); 23 Sep 2018 10:55:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 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= 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; Sun, 23 Sep 2018 10:55:24 +0000 Received: from cc-smtpin2.netcologne.de (cc-smtpin2.netcologne.de [89.1.8.202]) by cc-smtpout3.netcologne.de (Postfix) with ESMTP id 7828512629; Sun, 23 Sep 2018 12:55:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=netcologne.de; s=nc1116a; t=1537700122; bh=YnCLEApzJYLcsEmDsyiGtLL661w2eosi2GZ1B5giMuQ=; h=To:From:Subject:Message-ID:Date:From; b=ajWlTZ4pZFmEjmh33qcNcictl5f075lg8V2v+weLeMoQJDdfpznx9ERCim822cUPj r+t4jPnV6/02j+LIoD2m9mVzflJjkoT+jPKqvcR6CxsbMp0BmRsXckmZ8ym5gk3QEA fZ51FCFcX1qzLTZaYuC1Eji0uGc8FI+JqQjvaAE9HSJfaDFpxXeKufjyIqyvrShT1D TEvqcOkiIaQH7lvfB04CfhdCybHtLFzP5m0yu09++TlTpmiM/E7aY7fQ2zl44mq5lA 20KcrfTq1czZ14TwOOSQcPFNUMzp9DfXmKI/Di552RxhQnlv5jRiI+Bu6Nt7X9+eOg 9f/AruX8iYoFA== Received: from localhost (localhost [127.0.0.1]) by cc-smtpin2.netcologne.de (Postfix) with ESMTP id 7475111EA8; Sun, 23 Sep 2018 12:55:22 +0200 (CEST) Received: from [78.35.132.184] (helo=cc-smtpin2.netcologne.de) by localhost with ESMTP (eXpurgate 4.6.0) (envelope-from ) id 5ba7711a-01b0-7f0000012729-7f000001e032-1 for ; Sun, 23 Sep 2018 12:55:22 +0200 Received: from [192.168.178.68] (xdsl-78-35-132-184.netcologne.de [78.35.132.184]) (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; Sun, 23 Sep 2018 12:55:21 +0200 (CEST) To: "fortran@gcc.gnu.org" , gcc-patches From: Thomas Koenig Subject: [patch, fortran, committed] Fix regression caused by clobber for INTENT(OUT) patch Message-ID: Date: Sun, 23 Sep 2018 12:55:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 Hello world, the attached patch, committed as obvious, fixes a regression introduced by yesterday's patch. Apparently, clobber statements are even more finicky that I thought and do not work for saved variables either. Regards Thomas 2018-09-23 Thomas Koenig PR fortran/87395 * gfc_conv_procedure_call: Reformat comments slightly. Do not add clobber on INTENT(OUT) for saved variables. 2018-09-23 Thomas Koenig PR fortran/87395 * gfortran.dg/intent_out_10.f90: New test. Index: trans-expr.c =================================================================== --- trans-expr.c (Revision 264506) +++ trans-expr.c (Arbeitskopie) @@ -5281,7 +5281,10 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * add_clobber = fsym && fsym->attr.intent == INTENT_OUT && !fsym->attr.allocatable && !fsym->attr.pointer && !e->symtree->n.sym->attr.pointer - && !e->symtree->n.sym->attr.dummy /* See PR 41453. */ + /* See PR 41453. */ + && !e->symtree->n.sym->attr.dummy + /* FIXME - PR 87395 and PR 41453 */ + && e->symtree->n.sym->attr.save == SAVE_NONE && e->ts.type != BT_CHARACTER && e->ts.type != BT_DERIVED && e->ts.type != BT_CLASS && !sym->attr.elemental;