From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by sourceware.org (Postfix) with ESMTPS id 3D4EC3858D32; Thu, 26 Oct 2023 19:22:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3D4EC3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmx.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3D4EC3858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=212.227.17.20 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698348138; cv=none; b=ejWxFJmnndo91pFuGj/b7viszjJvt0/CPh+MESt/OLNJKnWvGf4xK4aQmDnfgdHKlJuEkmqt5xhqjhNNEPCWORvy4d+vZOyZckABqMSrUmiN1m2VVEMhJYjYxmnX9tvIyIw0xDwUiFo0GQMM5wdPoeM8hReKM0WBy+Yxf1CHSjo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698348138; c=relaxed/simple; bh=JVEkUaTCDEUMCWjqF4GT+e0exbQc/tALU5CE1h+22uU=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=x/YsQmiLOtvOkAFskG1QDsjYW+PATXMA7pxEch4PuMrG+wEKY5r3eKOi2FZINOFz3PVxlpZ6bgb8jPl1HQwo0sHQakSs2I7ZZYixoESEEDZ/VOYtwm4Qqt5eq4lVajwP93Qrmes1Hgu2rwELciY886gmD3Pa58u3gaAQ+Fz11O8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1698348132; x=1698952932; i=anlauf@gmx.de; bh=JVEkUaTCDEUMCWjqF4GT+e0exbQc/tALU5CE1h+22uU=; h=X-UI-Sender-Class:Date:Subject:To:References:From:In-Reply-To; b=Z0Tr6X11SjpmXHvkqcZ6FXHwpLfRWhdCKduXk/Iv4MsF2hj7xDSpYKQF3uoII0ij wmaztNJoN8rcxpgTSQLKgjM19cW9stqghL28H5M7OECKVs/lESzzKnumsSSX7N5Ax MIbpyXnO5ET4QM7smrw/1w9NIEOECzqRRRbQnqS7B06WXN9kN9RDQDWfcjh80q9Tl x26vjo+NUW5I9HH5750KVMAYcQaJ30DfJmrb0IUIGiHq3Aw35x1rbPiqqZ3ahgOVY WudPPcAPHvo0RTAxa5Wo1kf4D9TqMn8cHZK3XX3DFM1X8dQ7mEModNoIe3TMtU5/b KHgZrjIHjA3cxpByCQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.178.29] ([93.207.86.162]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MvbG2-1rnN2Y3BZu-00shsc; Thu, 26 Oct 2023 21:22:12 +0200 Message-ID: <9da28bdc-a6a6-4b26-83b2-17620c4ca975@gmx.de> Date: Thu, 26 Oct 2023 21:22:11 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [Patch, fortran] PR104625 ICE in fixup_array_ref, at fortran/resolve.cc:9275 since r10-2912-g70570ec192745095 To: Paul Richard Thomas , "fortran@gcc.gnu.org" , gcc-patches Newsgroups: gmane.comp.gcc.patches,gmane.comp.gcc.fortran References: Content-Language: en-US From: Harald Anlauf In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:VMnix8bIaqSfw01R9RMffrkfDyI7iY+JkPQfT8WKG20gDh9svpT cVmpGG7k94DND/BjH/P/Vc6jf20Yk+XnN1TdYwG5h26RbWvHLy1VFxtZ8UkWZ0sqbd2hbJm Ah1tnE+HrTGQ9uZEcU0QSP90qDonfX4N7+x+4WnHnfgDIyB2waRIdnmzLg+x1Wuy30N1GMb uuUhi2QOpBx4UAm8LmY9g== UI-OutboundReport: notjun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VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_NUMSUBJECT,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,WEIRD_PORT 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: Hi Paul, this looks all good to me. It is great that you added the handling of nested parentheses to the resolution, as that appears to be needed also in other situations. Thanks for the patch! Harald On 10/26/23 19:14, Paul Richard Thomas wrote: > Hi All, > > The attached patch fixes the original problem, in which parentheses arou= nd > the selector in select type constructs caused ICES. Stacked parentheses > caused problems in trans-stmt.cc. Rather than tracking this down, the > redundant parentheses were removed on resolution of the selector > expression. > > Fixing the primary problem revealed "Unclassifiable statement" errors wh= en > using array references of the associate variable and this was fixed as > well. Finally, the error triggered by using associate variables associat= ed > with non-variable selectors was corrected to ensure that only vector > indexed selectors were flagged up as such. The secondary error in > associate_55.f90 was corrected for this, since the selector might or mig= ht > not be vector indexed. > > Regtests fine - OK for trunk? > > Paul > > Fortran: Fix some problems with SELECT TYPE selectors [PR104625]. > > 2023-10-26 Paul Thomas > > gcc/fortran > PR fortran/104625 > * expr.cc (gfc_check_vardef_context): Check that the target > does have a vector index before emitting the specific error. > * match.cc (copy_ts_from_selector_to_associate): Ensure that > class valued operator expressions set the selector rank and > use the rank to provide the associate variable with an > appropriate array spec. > * resolve.cc (resolve_operator): Reduce stacked parentheses to > a single pair. > (fixup_array_ref): Extract selector symbol from parentheses. > > gcc/testsuite/ > PR fortran/104625 > * gfortran.dg/pr104625.f90: New test. > * gfortran.dg/associate_55.f90: Change error check text. >