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 97AED3858D35; Mon, 11 Oct 2021 20:13:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 97AED3858D35 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: VTPiQ/q5NLxNU0oS1IU/VFrhUu8B41OAg5+Y9KBnMThgDJAU19D8je7/vXeUk/Za1teJ2N+d1m 93iYtfB8AWW7E9kRtWl9NE3EMlq8zy47nVaG9LFNKUTzoGi2XbStlKrDVI15liObJvicyneElq PhwtsvG6a24dSIzpfgRm2X+GYoWv4bb43vb9eQLM4Rx7bCQRbMzTF6wG04XQPGDhYXtlrPOxvw yBwW6xwMs6MPrAqlZSHZfh45g2LVHNEECc9rH/XPlCf7MLPYbVbgcu1rDDG1Nglhos1R7uWH1S DO23oRYb7YwR4Gjh6oZNoJUy X-IronPort-AV: E=Sophos;i="5.85,365,1624348800"; d="scan'208";a="67043387" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 11 Oct 2021 12:13:07 -0800 IronPort-SDR: k/aNj1sbYKiPB95eszLQyWew76WmMvtmo5HDxWHc8qH/861H4Hqx23EJs7HQJ3dkts5NednODq WptrLvMvuPreBNrgC2MgwNZVd7/thbl0hDhcuZtvavYIgk/FbXpoHYN1Em8+9XWOTjZTypS7JT jQ2YC5/1It+mmI85avr8ks6w0dZv8zxSYxWbBNlz8UACeyvWGCvuQEjKecHcbzbzDoX/GJ4SpE uuo7N5+tMQLlG4UYAFohn1Ck0yvr807fdTDssT22STWwVjMFjPN+2TNLVdtSagE1E0dBEf8PE0 08M= Message-ID: Date: Mon, 11 Oct 2021 22:13:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: PING**2 - (Re: [Patch] Fortran: Various CLASS + assumed-rank fixed [PR102541]) Content-Language: en-US From: Tobias Burnus To: gcc-patches , fortran References: CC: Thomas Koenig , Paul Richard Thomas In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-08.mgc.mentorg.com (139.181.222.8) 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, KAM_SHORT, 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, 11 Oct 2021 20:13:10 -0000 PING**2 On 06.10.21 12:24, Tobias Burnus wrote: > Early ping for this patch. I do note that Harald browsed the patch (thanks!) and had two remarks, cf. https://gcc.gnu.org/pipermail/gcc-patches/2021-October/581256.html (I intent to fix the two nits =E2=80=93 as mentioned in the reply to Harald= 's email.) > (I still plan to review Harald's pending patch soon, unless someone > beats me: > https://gcc.gnu.org/pipermail/gcc-patches/2021-October/580810.html ) Jerry was faster =E2=80=93 thanks for that review! Tobias > On 01.10.21 02:43, Tobias Burnus wrote: >> Hi all, >> >> this patch fixes a bunch of issues with CLASS. >> >> * * * >> >> Side remark: I disliked the way CLASS is represented when it was >> introduced; >> when writing the testcase for this PR and kept fixing the testcase >> fallout, >> I started to hate it! >> I am sure that there are more issues =E2=80=93 but I tried hard not too = look >> closer >> at surrounding code to avoid hitting more issues. >> (If you look for a project, I think if you put attributes on separate >> lines, >> like a separate "POINTER :: var" line, you have a high chance to hit the >> error.) >> >> * * * >> >> What I found rather puzzling is that the 'optional' argument could be >> either >> on sym->attr.optional or on CLASS_DATA (sym)->attr.optional. I think one >> occurs for 'foo2' and the other for 'foo4' - not that I understand >> why it >> differs. >> >> I think it is otherwise straight forward. Regarding the original issue: >> >> In order to detect an assumed-size argument to an assumed-rank array, >> the last dimension has 'ubound =3D -1' to indicate an assume-size array; >> for those size(x, dim=3Drank(x)-1) =3D=3D -1 and size(x) < 0 >> >> However, when the dummy argument (and hence: actual argument) is either >> a pointer or an allocatable, the bound is passed as is (in particular, >> "-1" is a valid ubound and size(x) >=3D 0). =E2=80=93 However, if the ac= tual >> argument is unallocated/not associated, rank(var) still is supposed to >> work - hence, it has to be set. >> >> The last two items did work before - but not for CLASS -> CLASS. >> Additionally, >> the ubound =3D -1 had an issue for CLASS -> TYPE as the code assumed tha= t >> expr->ref is the whole array ("var(full-array-ref)") but for CLASS the >> expr->ref is a component and only expr->ref->next is the array ref. >> ("var%_data(full-array-ref)"). >> >> OK for mainline? >> >> 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