From patchwork Sun Jan 13 15:00:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 1024099 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-493964-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="jKjsP8QJ"; dkim=pass (2048-bit key; unprotected) header.d=netcologne.de header.i=@netcologne.de header.b="WIYECKpB"; 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 43d0DQ3F9yz9s4s for ; Mon, 14 Jan 2019 02:01:24 +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=aAAOwvEHsdX+kJlVCSE5syJli5NJyvJ7RSAPLxOSIyEZXnFV7V +8av2si1qXynaEyFfGTdi8HWnDJJAjlAkxBrGQJJGuR5ybQbPiIvJL4XbPnyc/HN ZApW9WW3MTZua/buwqk/r2ToFDHCI7bzjhFs22bKSjXkWAahv5r+cBxO0= 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=LRUUa2GTh1W7dPi5LXtrHukPlXw=; b=jKjsP8QJ/3OaK7zQiDjc r79F3eTqbJS0hxy4gu0CTgx1uuwtI4bWBQPnMNbH54rD3vToIiMbJqwUDdWheoYN up3dW/jt67H12Wn/SAz5ThTlTCnJAVtO5xymprKwG3zalCP3pbOiu9siaYKxW6E0 b+Vj/C+oJ85EIBVn7flzL7E= Received: (qmail 46144 invoked by alias); 13 Jan 2019 15:01:17 -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 45912 invoked by uid 89); 13 Jan 2019 15:01:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-12.1 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=Tobias, Burnus, tobias, unnecessarily X-HELO: cc-smtpout1.netcologne.de Received: from cc-smtpout1.netcologne.de (HELO cc-smtpout1.netcologne.de) (89.1.8.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 13 Jan 2019 15:00:58 +0000 Received: from cc-smtpin2.netcologne.de (cc-smtpin2.netcologne.de [89.1.8.202]) by cc-smtpout1.netcologne.de (Postfix) with ESMTP id 1A29A13424; Sun, 13 Jan 2019 16:00:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=netcologne.de; s=nc1116a; t=1547391649; bh=gQU5TJ955Wqck5Gzj04RWC7Vo2nTEgPtwC6G7EYtG8o=; h=To:From:Subject:Message-ID:Date:From; b=WIYECKpBX4++fmFIq+Z4AxIhN12bZDQZD39igDJNlBWNeFvypLYsMhqu2oQHB6BUG N0FPYlsyGg0PrcAKKkkbDyiF27E2NWqRASFf5rg2JM7GspApdyRugE1gWr2Fbc193W Kq0MTGjFdEU6nOtFNimCFnC6f4B/CG9rejXyyRLlWXW2XyGO6OYSpRrbXs9hg9bpLh Ld6qSRJK4Sg96c+CQNCAJ1WmpmZZhmv9cBKkrImEdZQsc9MdiGpPXU1lIMmz2x/h9Y U7NRR29E4RBGQke5B2NYOS3XH3jvEkmodVjjhgFgz/x8Fyg9knjq+v3cfvrZ3wuLpO f4pRKp7/GAihw== Received: from localhost (localhost [127.0.0.1]) by cc-smtpin2.netcologne.de (Postfix) with ESMTP id 1738F11EC3; Sun, 13 Jan 2019 16:00:49 +0100 (CET) Received: from [78.35.146.213] (helo=cc-smtpin2.netcologne.de) by localhost with ESMTP (eXpurgate 4.6.0) (envelope-from ) id 5c3b52a1-01b0-7f0000012729-7f000001baee-1 for ; Sun, 13 Jan 2019 16:00:49 +0100 Received: from [192.168.178.68] (xdsl-78-35-146-213.nc.de [78.35.146.213]) (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, 13 Jan 2019 16:00:47 +0100 (CET) To: "fortran@gcc.gnu.org" , gcc-patches From: Thomas Koenig Subject: [patch, fortran, committed] Fix PR 57792 Message-ID: <71e0119c-3b48-2532-e794-4903e027ab80@netcologne.de> Date: Sun, 13 Jan 2019 16:00:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 Hell world, as part of the contiguous improvement process in gfortran, I have committed the patch below as obvious. gfortran now does not pack/unpack if a function result is contiguous. Regards Thomas 2019-01-13 Thomas Koenig PR fortran/57992 * trans-array.c (gfc_conv_array_parameter): Do not pack/unpack functions with contiguous results. 2019-01-13 Thomas Koenig PR fortran/57792 * gfortran.dg/internal_pack_18.f90: New test. Index: trans-array.c =================================================================== --- trans-array.c (Revision 267903) +++ trans-array.c (Arbeitskopie) @@ -7894,7 +7894,9 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * { gfc_symbol *result = expr->value.function.esym->result; if (result->attr.dimension - && (result->as->type == AS_EXPLICIT || result->attr.allocatable)) + && (result->as->type == AS_EXPLICIT + || result->attr.allocatable + || result->attr.contiguous)) no_pack = 1; } }