From patchwork Tue Dec 10 22:00:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 1207314 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-515653-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="m2ssk6g/"; dkim=pass (2048-bit key; unprotected) header.d=netcologne.de header.i=@netcologne.de header.b="NOCANHKe"; 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 47XYsx2zqNz9sNH for ; Wed, 11 Dec 2019 09:01:07 +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=tJRqO1wLp33kFZJ+9x2GrodPEUDqQ2ZlyrF7Cl1pFoxKM8rQyr gL81haqKVjPTUARcMWygU7VcUT5uRuljJwpX013tB9OS4h1e7FutINCgbX1PSX7F l8sQAVPwHZO4umA12JpCRYiQ52QVI3rXExPPC3z+093LQA1rzqVlNlqbI= 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=17VoRm/LR3f3BMITNNW1UAxMKJU=; b=m2ssk6g/ZfGuEhNjih5y qkv4iGqIEiNv9LLxBu4lyrR50bHFnB0pt+CiMZofI1B1Ry4kMH2gd6r4B5Ajf9aa DKGQawwFuNtVsmc76UAt0hGl2uzG48AOYTa2+qEQJN9qPLqobEfEGSKWY6HHdrN0 vbVUyCa9G1y8jqbPQoD7QjY= Received: (qmail 96862 invoked by alias); 10 Dec 2019 22:00:59 -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 96846 invoked by uid 89); 10 Dec 2019 22:00:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-12.6 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1420 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, 10 Dec 2019 22:00:56 +0000 Received: from cc-smtpin1.netcologne.de (cc-smtpin1.netcologne.de [89.1.8.201]) by cc-smtpout3.netcologne.de (Postfix) with ESMTP id 728F6125B2; Tue, 10 Dec 2019 23:00:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=netcologne.de; s=nc1116a; t=1576015254; bh=7Qk+if3viDn67JYxBQKpx0ss7BWB3NYz+oNI61HOYv4=; h=To:From:Subject:Message-ID:Date:From; b=NOCANHKeG2zMPKRNmJ3G+CaGfBm3RgREjUhOBSH0yu6JeHu06UQ9tHlmQCn9NSKXD sX5Pg/jbUeMRAUGtlrUsTC6G4CY+r6koqmN/I7DH9DXIkjmlZeO9lcON4ah8O/xwka o9nEUoWH40RbQTqfPqzEVxKtWRjJz2FIbEgmryuDL9KS54uZswrhbxwnkf+KfVQC5e pa6n5RhRZyqV3QYJhn8dJRNA8UetNPWj8d9wAGZHgIfG3Mz1N7+N4tCF1hnWIdmlV9 6cWR1oNjs6EziMd7Cfgk0/PM7B1JBK9h0ZImKB1DUzUeGfIH2vJrmBtWaBrtbm0AuP +X3RgpMVKl9mg== Received: from localhost (localhost [127.0.0.1]) by cc-smtpin1.netcologne.de (Postfix) with ESMTP id 6F9FA11D96; Tue, 10 Dec 2019 23:00:54 +0100 (CET) Received: from [2001:4dd7:c4e0:0:7285:c2ff:fe6c:992d] (helo=cc-smtpin1.netcologne.de) by localhost with ESMTP (eXpurgate 4.11.6) (envelope-from ) id 5df01596-45d8-7f0000012729-7f000001c5a4-1 for ; Tue, 10 Dec 2019 23:00:54 +0100 Received: from [IPv6:2001:4dd7:c4e0:0:7285:c2ff:fe6c:992d] (2001-4dd7-c4e0-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de [IPv6:2001:4dd7:c4e0:0:7285:c2ff:fe6c:992d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by cc-smtpin1.netcologne.de (Postfix) with ESMTPSA; Tue, 10 Dec 2019 23:00:53 +0100 (CET) To: "fortran@gcc.gnu.org" , gcc-patches From: Thomas Koenig Subject: [patch, fortran, committed] Fix PR 91643, repacking of assumed rank argument Message-ID: <9b434d04-8c88-07dd-a2ff-ef839947136f@netcologne.de> Date: Tue, 10 Dec 2019 23:00:52 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 Hello world, this fixes a regression introduced by my inline repacking patch. With the test case, it is simple and obvious enough - do not repack an assumed rank argument (which makes no sense). Committed as obvious and simple as r279203 after regression-testing. 2019-12-10 Thomas Koenig PR fortran/91643 * trans-array.c (gfc_conv_array_parameter): Do not repack an assume dummy argument. 2019-12-10 Thomas Koenig PR fortran/91643 * gfortran.dg/assumed_rank_18.f90: New test. Index: trans-array.c =================================================================== --- trans-array.c (Revision 279064) +++ trans-array.c (Arbeitskopie) @@ -8141,6 +8141,8 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * if (g77 && optimize && !optimize_size && expr->expr_type == EXPR_VARIABLE && !is_pointer (expr) && ! gfc_has_dimen_vector_ref (expr) + && !(expr->symtree->n.sym->as + && expr->symtree->n.sym->as->type == AS_ASSUMED_RANK) && (fsym == NULL || fsym->ts.type != BT_ASSUMED)) { gfc_conv_subref_array_arg (se, expr, g77,