From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id E4BFC3858409; Mon, 20 Sep 2021 07:58:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E4BFC3858409 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: YvO/MbMCigFHJvaoG/wuWfNGVifL7GzDML9QWfqOQOzSKwQeKbsAqGY3IoCcCvaY1hsaNXMQqP voXvBTt7Piw4MbVL9iYNCnU3Uzlea/eC3nn+jtqIBhFNwhX8BQFEQERk2EETc58INaX2BnPCdj E69JckQvK/Ti4NrAtcsYSUrEfhnF+Z2xleYqZeahhEk3sfijGJe2d/MQd/rp3XRbv4kiN8LyWg i77jvddMFDp0L1g2jaHgvn+RjmtfcwJ50EZB/wEkCn0+yTLvT4/OWaobBL1aqlUhfYFjnIIsQz Ry6J5DWK3xbXlI9uxEbqaZYj X-IronPort-AV: E=Sophos;i="5.85,307,1624348800"; d="scan'208";a="66049245" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 19 Sep 2021 23:58:24 -0800 IronPort-SDR: I/mbNnPyamQLNSGVBihml6wlK+H8KI3BnMfhrZIs0/yleDR2x49Ph5e4x/Q8gc+SSknjiLpy94 kz3SpWgxFBKViHwXQJIw2xW0o2BRn1hRUsSdrvA9OHjiJUAwhTkCNXz5uTNQEmHAggyy0Wk2Zm UbljnXYZQHZRUfjL3zbam0pDWQEuelMKd4+YUjRx1Gmsq/0V4TXbvz0QFJah5CLrAubz82D0aX 8n8dGki2gD8pMac8zvlGdQ3DU7D1AO0NO+8gexsdP7UREljZoZ5Tz9uAgfKfxv2RGM6iak19bq QWY= Subject: Re: [PATCH, Fortran] Fixes for F2018 C838 (PR fortran/101334) To: Sandra Loosemore , "gcc-patches@gcc.gnu.org" , "fortran@gcc.gnu.org" References: From: Tobias Burnus Message-ID: Date: Mon, 20 Sep 2021 09:58:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-06.mgc.mentorg.com (139.181.222.6) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2021 07:58:29 -0000 On 20.09.21 06:01, Sandra Loosemore wrote: > This patch fixes some bugs in handling of assumed-rank arguments > revealed by the TS29113 testsuite, allowing xfails to be removed from > those testcases. It was previously failing to diagnose an error when > passing an assumed-rank argument to a procedure via a non-assumed-rank > dummy, and giving a bogus error when passing one as the first argument > to the ASSOCIATED intrinsic. Both fixes turned out to be 1-liners. > OK to commit? OK - however, I think you should first commit your follow-up/second patch (= fix testsuite) to avoid intermittent test-suite fails. Additionally, if I try the following testcase, which is now permitted, I ge= t two ICEs. Can you check? * The first one seems to be a bug in gfc_conv_intrinsic_function, which assumes also for assumed rank that if the first argument is an array, the second argument must also be an array. * For the second one, I see in the dump: p->dim[p->dtype.rank + -1].stride is seems as '-1' is gfc_array_index_type while 'dtype.rank' is signed_ch= ar_type_node. (Disclaimer: I don't have a clean tree, but I think this issue not affected by my patches.) subroutine foo(p, lp, lpd) use iso_c_binding implicit none (type, external) real, pointer :: p(..) real, pointer :: lp real, pointer :: lpd(:,:) ! gfc_conv_expr_descriptor, at fortran/trans-array.c:7324 if (associated(p, lp)) stop 1 ! verify_gimple: type mismatch in binary expression - signed char, signed c= har, integer(kind=3D8), _4 =3D _3 + -1; if (associated(p, lpd)) stop 1 end Tobias ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955