From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 796733858D28; Tue, 20 Sep 2022 11:51:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 796733858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.93,330,1654588800"; d="diff'?scan'208,217";a="83185334" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 20 Sep 2022 03:51:20 -0800 IronPort-SDR: kBu2ue2vFRpANb6U4UsUyFjD07mWP+bos5llJiG+pU1eOLkVeY/rAx78wnVSdVBgb39ptVCXVU jiAIM0ICsJxTuSf3uJfcK2vnxmZYsPK+Q0cjwDZr57B5WsrmWyWmaeA7fIPV1ig83Rov/GlLtb b4ya9EzfpRJMU0P27KdyJAJ0dbAK13q5nQUsc5/RDxjsis5a3gT1gDkl9oujCGN7mcea1+9OlL S4oeq1m+k8EoaXc2QsHJYYXQkk7jERnHDLFWJq8oUrxQv5XB48X5sVm+8SufBMVt69z/F3TBMm eZU= Content-Type: multipart/mixed; boundary="------------z33dDy0qWBvM620u0hLVlWx1" Message-ID: <86200df9-4b14-11ca-05db-1d033870f537@codesourcery.com> Date: Tue, 20 Sep 2022 13:51:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Content-Language: en-US To: gcc-patches , fortran From: Tobias Burnus Subject: [Patch] Fortran: F2018 type(*),dimension(*) with scalars [PR104143] X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,KAM_DMARC_STATUS,KAM_SHORT,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --------------z33dDy0qWBvM620u0hLVlWx1 Content-Type: multipart/alternative; boundary="------------Mbb0Jomp1qlrJwbecPweAdN1" --------------Mbb0Jomp1qlrJwbecPweAdN1 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: quoted-printable In several cases, one just wants to have the address where an object starts without requiring the detour via 'c_loc' and the (locally) required 'target' attribute. In principle, type(*),dimension(*) of TS29113 permits this, except that 'dimension(*)' only permits arrays and array elements but not scalars. Fortran 2018 modified this such that with 'type(*)' also scalars are permit= ted. (See PR for the quotes.) This patch implements this simple change. Before, implementations like MPI had to use '!GCC$ attribute NO_ARG_CHECK ::' in addition to type(*),dimensi= on(*) to achieve this. In GCC, we do likewise, but that's at least inside the com= piler, cf. libgomp/openacc{.f90,_lib.h}. OK for mainline? Tobias PS: I know that there are still patches to be reviewed; I am not sure wrt I= EEE but I think most of the clobber patches still need a review and likely also= some of Harald's patches. I think we also need to take care of some more of the = ready or nearly ready patches by Jos=C3=A9. (I somewhere have a list that could d= ig it out quickly, if someone want to do some work on this. However, some were already handled= by Harald.) Unfortunately, I am currently too busy with other things (OpenMP, looking at issues in mostly OpenMP-related testsuites, OpenMP spec issues, a bunch of = odd things) to really work on Fortran, especially as too many of the other list= ed items are likewise non-primary work items and I shouldn't really keep incre= asing the time spend on work-related-but-not-to-be-focused-on items... Otherwise: Last weekend was the GNU Tools Cauldron, https://gcc.gnu.org/wik= i/cauldron2022 A few slides are already online (including mine) and the recordings should = become available soon, in case you are interested. ----------------- 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 --------------Mbb0Jomp1qlrJwbecPweAdN1-- --------------z33dDy0qWBvM620u0hLVlWx1 Content-Type: text/x-patch; charset="UTF-8"; name="assumed-type-rank.diff" Content-Disposition: attachment; filename="assumed-type-rank.diff" Content-Transfer-Encoding: base64 Rm9ydHJhbjogRjIwMTggdHlwZSgqKSxkaW1lbnNpb24oKikgd2l0aCBzY2Fs YXJzIFtQUjEwNDE0M10KCkFzc3VtZWQtc2l6ZSBkdW1teSBhcmd1bWVudHMg YWNjZXB0IGFycmF5cyBhbmQgYXJyYXkgZWxlbWVudHMgYXMgYWN0dWFsCmFy Z3VtZW50cy4gVGhlcmUgYXJlIGFsc28gYSBmZXcgZXhjZXB0aW9ucyB3aGVu IHJlYWwgc2NhbGFycyBhcmUgcGVybWl0dGVkLgpTaW5jZSBGMjAxOCwgdGhp cyBpbmNsdWRlcyBzY2FsYXIgYXJndW1lbnRzIHRvIGFzc3VtZWQtdHlwZSBk dW1taWVzOyB3aGlsZQp0eXBlKCopIHdhcyBhZGRlZCBpbiBUUzI5MTEzLCB0 aGlzIGNoYW5nZSBpcyBvbmx5IGluIEYyMDE4IGl0c2VsZi4KCglQUiBmb3J0 cmFuLzEwNDE0MwoKZ2NjL2ZvcnRyYW4vQ2hhbmdlTG9nOgoKCSogaW50ZXJm YWNlLmNjIChjb21wYXJlX3BhcmFtZXRlcik6IFBlcm1pdCBzY2FsYXIgYXJn cyB0bwoJJ3R5cGUoKiksIGRpbWVuc2lvbigqKScuCgpnY2MvdGVzdHN1aXRl L0NoYW5nZUxvZzoKCgkqIGdmb3J0cmFuLmRnL2MtaW50ZXJvcC9jNDA3Yi0y LmY5MDogUmVtb3ZlIGRnLWVycm9yLgoJKiBnZm9ydHJhbi5kZy9hc3N1bWVk X3R5cGVfMTYuZjkwOiB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