From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by sourceware.org (Postfix) with ESMTPS id 880423858D1E; Tue, 21 May 2024 18:58:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 880423858D1E Authentication-Results: sourceware.org; dmarc=pass (p=quarantine 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 880423858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=212.227.17.22 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716317923; cv=none; b=feCEF6g3gsySJY/865Lge3xCAm0IvU9flHFWD5uwsnyrneAn0ePhPjtwwaqlKgg7qd5n806jdVgFZH1K/pyGHMJ+rrZq0F3zL3GN7O4xPQtEMHtBwlFW8erFrhQ/4l2ORs3ikU1ZRQK8/JZmXJoarSN7v8gwTbx4wkOscEzz4Go= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716317923; c=relaxed/simple; bh=/BCjA1PaxEeN7jhzQ41+H6DBxoU8pm46MtMhA8u/Ls4=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=vGUm+qZTYgZIth3ciQIveEDJQ6/P3IpL/g/jTlShUYFFZMdg1OeRETHLib9uFhN6R/3vavMOb19wpWLiJxX4B178mzZNwPLeluWi6PrsJr8YOr4xuxq1bayLG9vDMnTGk/Sky0fkDXWpKR/4VyX0S5gJ5M9hYX/8UFseeKfOt5Q= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1716317919; x=1716922719; i=anlauf@gmx.de; bh=390HmEYwOB2AWj+vfwj+Ka4PlUH+LBTsSF/w1HMho/M=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=cMOtxFdhVJKAu3SjgMsOadnm/Nr5hXxS4plmL4Xzb4ZEaWtuqzjZitgOZ/Si9Q// LKlMWzirkUQqdRyhZGvBguy7D0TpwyFd8i458+13+R8j68+L6kdyjscmmHUh4lB/l 4pp6v6MfqsphTeM8toelkdvzLwqtqoiAjb2IMR3BUoCPpFEGAecdE5J6GlBBWNZlr eWRGVjWhtz76Cr2x3p1URIPchSGucxsde/GACIEf+txLDeUc4pHBeDhMlFXhX8gGN Pyq7By820xqGgYn8Qg09EvI0wxs69fEn7FS5DQohjj9XYaPRMMP63qSNBjTUjBV/7 5u4JuKHFM/qC+qdPoQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.178.29] ([79.232.149.151]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MWzjt-1s34lC2ui1-00Vz9l; Tue, 21 May 2024 20:58:39 +0200 Message-ID: <31e4d136-6271-496c-a0fd-d475cdee1a3a@gmx.de> Date: Tue, 21 May 2024 20:58:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [Patch, fortran] PR103312 - [11/12/13/14/15 Regression] ICE in gfc_find_component since r9-1098-g3cf89a7b992d483e 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:9yoN08mTEMPZ6bCbYw2aUFqxAYDALdzqb+vi32+e4snySQQvP+I +KMUdrcKjDPN/EcsUUXNx72MAfB6hHjHY9bxDYGpazjl0FHVVmTVuNh0MTQ4JsMAw89fCsw K2OVUUEdSt2rnKemb5gLZVntyh9o37Zfbt3MR5wapAjxJhLRM4lrTOCbbQJxtsmdfPFLkZL +2BnUrjaOnUs1A1ZTHQIg== UI-OutboundReport: notjunk:1;M01:P0:ajMPLF8zN1A=;IFkfUm5kcqObyiMCN91n80JwXwa 6+DWHj3o4xlWb8SRjMXI+lB8FzJkK1NxVh7KPMtzBxnV+tHa56582i213ML+KbO0K0oZex5ui VEl04qBEu+vtRqneSDp2Du9R+e8vyvLcEelmrXDTK9UduCVBeMI7uJYhsHImMWgR45/eG756r IJeUjoUd/Ve678Rt7zmSFkobydwlei6yAyi4gwf79JTuzYGm3/VN03AN2wpigDk9jBnfAF54m T0YhRqC8MWSWCSgOCvdZ8zTui8nHGfd9O5LYQfmVUa+Aa98V2oVYF2BDiZguhXP6nR9pB6q/D veSehkDuzoe3/yESvFxmjDMuJuDrMVarjOqFTljVPQNmJvGWXvtDs1xDyetdyDednWGKwMYlH gbjbo33AluML5J03MYzvZsxqRdCeXxmimkZZMertBFVgDh8Lb2vEa6d7cAXD7Na1nROUnC0nO 6d+jQPG/gNlonR23OPCwVW5fV6Rif/DkXLh3/Z0JseKIOSddTPvzoZxxdUZ8P4flCxqiAUcwB zmILa1sHSEd7pi6BCCFJo+Owhvy2Q1bYv49UJDZE4MzhpC1696DLQ0Ga5KnDEjJK7zsfek05z N1ojoA+DqWIupD5M1T1FPCVxVVeYjYWaCMYp7UZyuNAWGopQD+gYBMxVUOMN+LrBrxK2RjTtQ 5MM/ks9Mt+jrUZ7jORdjPj0sa9e9RHPSXdDR552G8aKHH5rSiYF0OPGtwinPPdTpdyobVbeNM 4bgrNbUf4t89msUBxZ8Lp+cSbXWyq+qMtHZm30m7EvOW4MhynZBJLJezVmvlsBcxGnwkwwxZj 4pfdL7rwPAyc/PoyiqiH2RD3UNlaK8VMOJN7b4C6jNcHw= X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,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: Hi Paul, Am 20.05.24 um 11:06 schrieb Paul Richard Thomas: > Hi All, > > I don't think that this PR is really a regression although the fact that= it > is marked as such brought it to my attention :-) > > The fix turned out to be remarkably simple. It was found after going dow= n a > silly number of rabbit holes, though! > > The chunk in dependency.cc is probably more elaborate than it needs to b= e. > Returning -2 is sufficient for the testcase to work. Otherwise, the > comments in the patch say it all. this part looks OK, but can you elaborate on this change to expr.cc: diff --git a/gcc/fortran/expr.cc b/gcc/fortran/expr.cc index c883966646c..4ee2ad55915 100644 =2D-- a/gcc/fortran/expr.cc +++ b/gcc/fortran/expr.cc @@ -3210,6 +3210,11 @@ gfc_reduce_init_expr (gfc_expr *expr) { bool t; + /* It is far too early to resolve a class compcall. Punt to resolution. */ + if (expr && expr->expr_type =3D=3D EXPR_COMPCALL + && expr->symtree->n.sym->ts.type =3D=3D BT_CLASS) + return true; + I would have expected to return 'false' here, as we do not have an expression that reduces to a constant. What am I missing? (The testcase compiles and works here also when using 'false'.) > OK for mainline? I will delay for a month before backporting. OK if can you show me wrong... Thanks, Harald > Regards > > Paul > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by sourceware.org (Postfix) with ESMTPS id CC70E384B06A for ; Tue, 21 May 2024 18:58:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CC70E384B06A Authentication-Results: sourceware.org; dmarc=fail (p=quarantine dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=m.gmane-mx.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CC70E384B06A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=116.202.254.214 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716317931; cv=none; b=f9QNSaP+gJ85FBVRMq/vPkIlLOO/F0f/PEbNI7OEhSeKsQ82WGrYiP7+lxBnbScUVCbO938k3oRtRlCRL+NPgL0dm3GXt989rZ2USVQJjamfY9AalSruip6PqtkTT/KK/zB4tz/hREfKrSKqM34ZgKD7H55w9+eMEHqKLWgR4f0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716317931; c=relaxed/simple; bh=ldG8fZq/MEvUVFGO+RLqVgutDKQtq7LXCDYCHze9fsk=; h=To:From:Subject:Date:Message-ID:Mime-Version; b=DaV0PDF2djQbqP8PRVp9VpF1EpsTVIU/nHaMs9zGkttTLJxq/oyM7v9BUbr3VulOZMWpa+J3DnTvigyr9DZWVMvmR+pPkAlbBu5xTmHlzl1mbXXR+Aazb2TlZtNWT/XstYuFpaFC4qkPlPN8g4MKPHnu0DOU/79N5wwdMJu9DO8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1s9UhC-0007aB-LD for gcc-patches@gcc.gnu.org; Tue, 21 May 2024 20:58:46 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gcc-patches@gcc.gnu.org From: Harald Anlauf Subject: Re: [Patch, fortran] PR103312 - [11/12/13/14/15 Regression] ICE in gfc_find_component since r9-1098-g3cf89a7b992d483e Date: Tue, 21 May 2024 20:58:39 +0200 Message-ID: <31e4d136-6271-496c-a0fd-d475cdee1a3a@gmx.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla Thunderbird Content-Language: en-US In-Reply-To: Cc: fortran@gcc.gnu.org X-Spam-Status: No, score=-9.1 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_NONE,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: Message-ID: <20240521185839.xndpq0f-8rCGmRZ5CvDMR5i55tgFZepQfRTXFuHYO9I@z> Hi Paul, Am 20.05.24 um 11:06 schrieb Paul Richard Thomas: > Hi All, > > I don't think that this PR is really a regression although the fact that it > is marked as such brought it to my attention :-) > > The fix turned out to be remarkably simple. It was found after going down a > silly number of rabbit holes, though! > > The chunk in dependency.cc is probably more elaborate than it needs to be. > Returning -2 is sufficient for the testcase to work. Otherwise, the > comments in the patch say it all. this part looks OK, but can you elaborate on this change to expr.cc: diff --git a/gcc/fortran/expr.cc b/gcc/fortran/expr.cc index c883966646c..4ee2ad55915 100644 --- a/gcc/fortran/expr.cc +++ b/gcc/fortran/expr.cc @@ -3210,6 +3210,11 @@ gfc_reduce_init_expr (gfc_expr *expr) { bool t; + /* It is far too early to resolve a class compcall. Punt to resolution. */ + if (expr && expr->expr_type == EXPR_COMPCALL + && expr->symtree->n.sym->ts.type == BT_CLASS) + return true; + I would have expected to return 'false' here, as we do not have an expression that reduces to a constant. What am I missing? (The testcase compiles and works here also when using 'false'.) > OK for mainline? I will delay for a month before backporting. OK if can you show me wrong... Thanks, Harald > Regards > > Paul >