From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by sourceware.org (Postfix) with ESMTPS id 0A89A3858D35; Sat, 24 Jun 2023 19:50:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0A89A3858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1687636255; x=1688241055; i=anlauf@gmx.de; bh=yw3uHZ6dXsoun8ANqs64gJGV768EcmXka0l0KJ6GvnE=; h=X-UI-Sender-Class:Date:Subject:To:References:From:In-Reply-To; b=ufkSkVGFWOhku/EpZ9nR0e+gMt6O3bqUwIff692C0ncRJpNQNtYPHg9ak2ReFYvKWupuz4d vCJ105eB8AOgiN01bmmWbsQ3+kgsxlA9eqGNbu9Am+eql5AwYKe0CwLD22EhAWfTYWlOaXGQx kbZb2C4UXhis38XRuJxMKfAL8OZdnQmkYoU7tpduOVPoQUrf7dU8YTPXSZZe9Nn8aigGI7DZC 5u9cexh9ofzB3bv9vevocYDc9Mmm50Z2oBjZkDicCy6c2UBymMSavmBLLyDT2C+IEnC8loZaj mv7BAKzuukmTZo8Le+tPz6iyI7E+dIPbKBu6UDAHPXSWSUo78+/g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.178.29] ([93.207.80.32]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MoO2E-1pkjQ63vOS-00oqKQ; Sat, 24 Jun 2023 21:50:55 +0200 Content-Type: multipart/mixed; boundary="------------ZUuwdq0Ua4rvfL56eioRw5QH" Message-ID: Date: Sat, 24 Jun 2023 21:50:53 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [Patch, fortran] PR49213 - [OOP] gfortran rejects structure constructor expression Content-Language: en-US To: Paul Richard Thomas , "fortran@gcc.gnu.org" , gcc-patches Newsgroups: gmane.comp.gcc.patches,gmane.comp.gcc.fortran References: From: Harald Anlauf In-Reply-To: X-Provags-ID: V03:K1:sCTcGf6XeYyLsCIs8csxzN2Dujx6S8PnsMs50tG+pIM7905qJ8m fsyZ5Lug/EvTZLoSpVzQsbD4ngDutgJHvuBnSaPskrP/pHzJaG2P8YKcyygsMue+IkMK3wk rZU1MO3T/+lcuYkE1YJmna6lRnFhAoBpddJkn3A9StahFLWeha+XgbLV2Vkij/mHfPoFq7R hYCUKI1RslR2QUrSvPARQ== UI-OutboundReport: notjunk:1;M01:P0:fL+LkVtsCdo=;Q4vL6InT/gj2jeomPmgKp0KtfCv oKK3bCMSctEsCj79up7ujnNxDMVpd7jMQb+22WxPzTCXte9P/DNkTkQitv9dcYbsRk99sB7YH eC0jFFy0z8UU7pSI8zfoye4oe1V6V1q43lAUkWjgEpuo98p/dAnYDO+yZXETUm3S+6PoWBbdR yYppKpN5AdTw5yg9R8Hy/jkgQnacfLz1k2beAlkHtyT03ZnrdRbugfLWYywQKtZK89TqnpB9t qlDzxqdpcXICat5krtLSR39qQV3W7UrTHLkXDigeidC1zRM3UVj9ep4hUm2L2KlshrN5X6uvK qjnvi2GfwgPp75Ein9qNOwXielvHTjWV8L0u+jjP3TmaNIgyl6qNoNxCLkNV0YcK9a6ePgryk Eo0T9AsyfkGP+ZualLDyDkmIToLj99ohueVz0M1ROGoxWispEvSibYZS7JCK4DNhuSIRZD0qn Wjicjc7gP6qQDr9Hku1J28Mqdjn0dnr0KAAPQDnQj0A02PrsT3pW0ysGcM5wJ5/S04GCZcYDD rgntGYho/7hviZx9qXugR5meNTrllEbOjOqgh31PBFvVjo17iiFNUL9U9oQjxf1dAES9FliZo kbWE2yL+rfVbvhMN40LFgbXbVgTf5hVDDlieHD/8FkL2snnex+IHAS8+U4+wk3gBRthxGj2OE zMNDNo9R+5ysAz8WNgMEttoQj7mUQcPASzN5HK2nXCluZcODlPzpxJ06AGmyWdYqFN4hq4dZM TPs++kKd3O1qJuxSO6tKkjlkuRbWLCMQacLbaC4ACTht2l5/kBcFiLV0nJqU5lpn24DR+ZWXE vl0Wit99Dj9kf3nMFs7LKk4noxvAZEZdTZqlki4HiSXJ8ZYNnsWT/uwN9vJ4KL0WBrCAvh7/y UUb1nC1eHQyA7IUhVzCw9InferZaBRWDGu4nwiwtt+DrAEs2hZ06GIbBB1zcdn2kx+vpF13bX mJMpKQ== X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: This is a multi-part message in MIME format. --------------ZUuwdq0Ua4rvfL56eioRw5QH Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi Paul! On 6/24/23 15:18, Paul Richard Thomas via Gcc-patches wrote: > I have included the adjustment to 'gfc_is_ptr_fcn' and eliminating the > extra blank line, introduced by my last patch. I played safe and went > exclusively for class functions with attr.class_pointer set on the > grounds that these have had all the accoutrements checked and built > (ie. class_ok). I am still not sure if this is necessary or not. maybe it is my fault, but I find the version in the patch confusing: @@ -816,7 +816,7 @@ bool gfc_is_ptr_fcn (gfc_expr *e) { return e !=3D NULL && e->expr_type =3D=3D EXPR_FUNCTION - && (gfc_expr_attr (e).pointer + && ((e->ts.type !=3D BT_CLASS && gfc_expr_attr (e).pointer) || (e->ts.type =3D=3D BT_CLASS && CLASS_DATA (e)->attr.class_pointer)); } The caller 'gfc_is_ptr_fcn' has e->expr_type =3D=3D EXPR_FUNCTION, so gfc_expr_attr (e) boils down to: if (e->value.function.esym && e->value.function.esym->result) { gfc_symbol *sym =3D e->value.function.esym->result; attr =3D sym->attr; if (sym->ts.type =3D=3D BT_CLASS && sym->attr.class_ok) { attr.dimension =3D CLASS_DATA (sym)->attr.dimension; attr.pointer =3D CLASS_DATA (sym)->attr.class_pointer; attr.allocatable =3D CLASS_DATA (sym)->attr.allocatable; } } ... else if (e->symtree) attr =3D gfc_variable_attr (e, NULL); So I thought this should already do what you want if you do gfc_is_ptr_fcn (gfc_expr *e) { return e !=3D NULL && e->expr_type =3D=3D EXPR_FUNCTION && gfc_expr_att= r (e).pointer; } or what am I missing? The additional checks in gfc_expr_attr are there to avoid ICEs in case CLASS_DATA (sym) has issues, and we all know Gerhard who showed that he is an expert in exploiting this. To sum up, I'd prefer to use the safer form if it works. If it doesn't, I would expect a latent issue. The rest of the code looked good to me, but I was suspicious about the handling of CHARACTER. Nasty as I am, I modified the testcase to use character(kind=3D4) instead of kind=3D1 (see attached). This either fails here (stop 10), or if I activate the marked line ! cont =3D tContainer('hello!') ! ### ICE! ### I get an ICE. Can you have another look? Thanks, Harald > > OK for trunk? > > Paul > > Fortran: Enable class expressions in structure constructors [PR49213] > > 2023-06-24 Paul Thomas > > gcc/fortran > PR fortran/49213 > * expr.cc (gfc_is_ptr_fcn): Guard pointer attribute to exclude > class expressions. > * resolve.cc (resolve_assoc_var): Call gfc_is_ptr_fcn to allow > associate names with pointer function targets to be used in > variable definition context. > * trans-decl.cc (get_symbol_decl): Remove extraneous line. > * trans-expr.cc (alloc_scalar_allocatable_subcomponent): Obtain > size of intrinsic and character expressions. > (gfc_trans_subcomponent_assign): Expand assignment to class > components to include intrinsic and character expressions. > > gcc/testsuite/ > PR fortran/49213 > * gfortran.dg/pr49213.f90 : New test --------------ZUuwdq0Ua4rvfL56eioRw5QH Content-Type: text/x-fortran; charset=UTF-8; name="pr49213-kind4.f90" Content-Disposition: attachment; filename="pr49213-kind4.f90" Content-Transfer-Encoding: base64 ISB7IGRnLWRvIHJ1biB9CiEKISBDb250cmlidXRlZCBieSBOZWlsIENhcmxzb24gIDxuZWls Lm4uY2FybHNvbkBnbWFpbC5jb20+CiEKcHJvZ3JhbSBtYWluCiEgY2hhcmFjdGVyKDIpIDo6 IGMKICBjaGFyYWN0ZXIoMixraW5kPTQpIDo6IGMKCiAgdHlwZSA6OiBTCiAgICBpbnRlZ2Vy IDo6IG4KICBlbmQgdHlwZQogIHR5cGUoUykgOjogU29iagoKICB0eXBlLCBleHRlbmRzKFMp IDo6IFMyCiAgICBpbnRlZ2VyIDo6IG0KICBlbmQgdHlwZQogIHR5cGUoUzIpIDo6IFMyb2Jq CgogIHR5cGUgOjogVAogICAgY2xhc3MoUyksIGFsbG9jYXRhYmxlIDo6IHgKICBlbmQgdHlw ZQogIHR5cGUoVCkgOjogVG9iagoKICBTb2JqID0gUygxKQogIFRvYmogPSBUKFNvYmopCgog IFMyb2JqID0gUzIoMSwyKQogIFRvYmogPSBUKFMyb2JqKSAgICAgICAgICAgICEgRmFpbGVk IGhlcmUKICBzZWxlY3QgdHlwZSAoeCA9PiBUb2JqJXgpCiAgICB0eXBlIGlzIChTMikKICAg ICAgaWYgKCh4JW4gLm5lLiAxKSAub3IuICh4JW0gLm5lLiAyKSkgc3RvcCAxCiAgICBjbGFz cyBkZWZhdWx0CiAgICAgIHN0b3AgMgogIGVuZCBzZWxlY3QKCiAgYyA9IDRfIiAgIgogIGNh bGwgcGFzc19pdCAoVChTb2JqKSkKICBpZiAoYyAubmUuIDRfIlMgIikgc3RvcCAzCiAgY2Fs bCBwYXNzX2l0IChUKFMyb2JqKSkgICAgISBhbmQgaGVyZQogIGlmIChjIC5uZS4gNF8iUzIi KSBzdG9wIDQKCiAgY2FsbCBiYXIKCmNvbnRhaW5zCgogIHN1YnJvdXRpbmUgcGFzc19pdCAo Zm9vKQogICAgdHlwZShUKSwgaW50ZW50KGluKSA6OiBmb28KICAgIHNlbGVjdCB0eXBlICh4 ID0+IGZvbyV4KQogICAgICB0eXBlIGlzIChTKQogICAgICAgIGMgPSA0XyJTICIKICAgICAg ICBpZiAoeCVuIC5uZS4gMSkgc3RvcCA1CiAgICAgIHR5cGUgaXMgKFMyKQogICAgICAgIGMg PSA0XyJTMiIKICAgICAgICBpZiAoKHglbiAubmUuIDEpIC5vci4gKHglbSAubmUuIDIpKSBz dG9wIDYKICAgICAgY2xhc3MgZGVmYXVsdAogICAgICAgIHN0b3AgNwogICAgZW5kIHNlbGVj dAogIGVuZCBzdWJyb3V0aW5lCgogIHN1YnJvdXRpbmUgYmFyCiAgICEgVGVzdCBmcm9tIGNv bW1lbnQgIzI5IG9mIHRoZSBQUiAtIGR1ZSB0byBKYW51cyBXZWlsCiAgICB0eXBlIHRDb250 YWluZXIKICAgICAgY2xhc3MoKiksIGFsbG9jYXRhYmxlIDo6IHgKICAgIGVuZCB0eXBlCiAg ICBpbnRlZ2VyLCBwYXJhbWV0ZXIgOjogaSA9IDAKICAgIGNoYXJhY3Rlcig3LGtpbmQ9NCkg OjogY2hyID0gNF8iZ29vZGJ5ZSIKICAgIHR5cGUodENvbnRhaW5lcikgOjogY29udAoKICAg IGNvbnQleCA9IGkgISBsaW5rZXIgZXJyb3I6IHVuZGVmaW5lZCByZWZlcmVuY2UgdG8gYF9f Y29weV9JTlRFR0VSXzRfLjM4MDQnCgogICAgY29udCA9IHRDb250YWluZXIoaSs0MikgISBG YWlsZWQgaGVyZQogICAgc2VsZWN0IHR5cGUgKHogPT4gY29udCV4KQogICAgICB0eXBlIGlz IChpbnRlZ2VyKQogICAgICAgIGlmICh6IC5uZS4gNDIpIHN0b3AgOAogICAgICBjbGFzcyBk ZWZhdWx0CiAgICAgICAgc3RvcCA5CiAgICBlbmQgc2VsZWN0CgohICAgIGNvbnQgPSB0Q29u dGFpbmVyKCdoZWxsbyEnKSAgICAgICAhICMjIyBJQ0UhICMjIwogICAgY29udCA9IHRDb250 YWluZXIoNF8naGVsbG8hJykKICAgIHNlbGVjdCB0eXBlICh6ID0+IGNvbnQleCkKICAgICAg dHlwZSBpcyAoY2hhcmFjdGVyKCosa2luZD00KSkKICAgICAgICBpZiAoeiAubmUuIDRfJ2hl bGxvIScpIHN0b3AgMTAKICAgICAgY2xhc3MgZGVmYXVsdAogICAgICAgIHN0b3AgMTEKICAg IGVuZCBzZWxlY3QKCiAgICBjb250ID0gdENvbnRhaW5lcihjaHIpCiAgICBzZWxlY3QgdHlw ZSAoeiA9PiBjb250JXgpCiAgICAgIHR5cGUgaXMgKGNoYXJhY3RlcigqLGtpbmQ9NCkpCiAg ICAgICAgaWYgKHogLm5lLiA0Xydnb29kYnllJykgc3RvcCAxMgogICAgICBjbGFzcyBkZWZh dWx0CiAgICAgICAgc3RvcCAxMwogICAgZW5kIHNlbGVjdAoKICBlbmQgc3Vicm91dGluZSBi YXIKZW5kIHByb2dyYW0K --------------ZUuwdq0Ua4rvfL56eioRw5QH-- 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 30616385841E for ; Sat, 24 Jun 2023 19:51:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 30616385841E Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=m.gmane-mx.org Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1qD9Hg-0007gW-TQ for gcc-patches@gcc.gnu.org; Sat, 24 Jun 2023 21:51:00 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gcc-patches@gcc.gnu.org From: Harald Anlauf Subject: Re: [Patch, fortran] PR49213 - [OOP] gfortran rejects structure constructor expression Date: Sat, 24 Jun 2023 21:50:53 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------ZUuwdq0Ua4rvfL56eioRw5QH" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US In-Reply-To: Cc: fortran@gcc.gnu.org X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no 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: <20230624195053.LnZOjCleRUDMCKpP9gsBwhdnosfJfsevcAOd7GYLvFo@z> This is a multi-part message in MIME format. --------------ZUuwdq0Ua4rvfL56eioRw5QH Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Paul! On 6/24/23 15:18, Paul Richard Thomas via Gcc-patches wrote: > I have included the adjustment to 'gfc_is_ptr_fcn' and eliminating the > extra blank line, introduced by my last patch. I played safe and went > exclusively for class functions with attr.class_pointer set on the > grounds that these have had all the accoutrements checked and built > (ie. class_ok). I am still not sure if this is necessary or not. maybe it is my fault, but I find the version in the patch confusing: @@ -816,7 +816,7 @@ bool gfc_is_ptr_fcn (gfc_expr *e) { return e != NULL && e->expr_type == EXPR_FUNCTION - && (gfc_expr_attr (e).pointer + && ((e->ts.type != BT_CLASS && gfc_expr_attr (e).pointer) || (e->ts.type == BT_CLASS && CLASS_DATA (e)->attr.class_pointer)); } The caller 'gfc_is_ptr_fcn' has e->expr_type == EXPR_FUNCTION, so gfc_expr_attr (e) boils down to: if (e->value.function.esym && e->value.function.esym->result) { gfc_symbol *sym = e->value.function.esym->result; attr = sym->attr; if (sym->ts.type == BT_CLASS && sym->attr.class_ok) { attr.dimension = CLASS_DATA (sym)->attr.dimension; attr.pointer = CLASS_DATA (sym)->attr.class_pointer; attr.allocatable = CLASS_DATA (sym)->attr.allocatable; } } ... else if (e->symtree) attr = gfc_variable_attr (e, NULL); So I thought this should already do what you want if you do gfc_is_ptr_fcn (gfc_expr *e) { return e != NULL && e->expr_type == EXPR_FUNCTION && gfc_expr_attr (e).pointer; } or what am I missing? The additional checks in gfc_expr_attr are there to avoid ICEs in case CLASS_DATA (sym) has issues, and we all know Gerhard who showed that he is an expert in exploiting this. To sum up, I'd prefer to use the safer form if it works. If it doesn't, I would expect a latent issue. The rest of the code looked good to me, but I was suspicious about the handling of CHARACTER. Nasty as I am, I modified the testcase to use character(kind=4) instead of kind=1 (see attached). This either fails here (stop 10), or if I activate the marked line ! cont = tContainer('hello!') ! ### ICE! ### I get an ICE. Can you have another look? Thanks, Harald > > OK for trunk? > > Paul > > Fortran: Enable class expressions in structure constructors [PR49213] > > 2023-06-24 Paul Thomas > > gcc/fortran > PR fortran/49213 > * expr.cc (gfc_is_ptr_fcn): Guard pointer attribute to exclude > class expressions. > * resolve.cc (resolve_assoc_var): Call gfc_is_ptr_fcn to allow > associate names with pointer function targets to be used in > variable definition context. > * trans-decl.cc (get_symbol_decl): Remove extraneous line. > * trans-expr.cc (alloc_scalar_allocatable_subcomponent): Obtain > size of intrinsic and character expressions. > (gfc_trans_subcomponent_assign): Expand assignment to class > components to include intrinsic and character expressions. > > gcc/testsuite/ > PR fortran/49213 > * gfortran.dg/pr49213.f90 : New test --------------ZUuwdq0Ua4rvfL56eioRw5QH Content-Type: text/x-fortran; charset=UTF-8; name="pr49213-kind4.f90" Content-Disposition: attachment; filename="pr49213-kind4.f90" Content-Transfer-Encoding: base64 ISB7IGRnLWRvIHJ1biB9CiEKISBDb250cmlidXRlZCBieSBOZWlsIENhcmxzb24gIDxuZWls Lm4uY2FybHNvbkBnbWFpbC5jb20+CiEKcHJvZ3JhbSBtYWluCiEgY2hhcmFjdGVyKDIpIDo6 IGMKICBjaGFyYWN0ZXIoMixraW5kPTQpIDo6IGMKCiAgdHlwZSA6OiBTCiAgICBpbnRlZ2Vy IDo6IG4KICBlbmQg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oeiA9PiBjb250JXgpCiAgICAgIHR5cGUgaXMgKGNoYXJhY3RlcigqLGtpbmQ9NCkpCiAg ICAgICAgaWYgKHogLm5lLiA0Xydnb29kYnllJykgc3RvcCAxMgogICAgICBjbGFzcyBkZWZh dWx0CiAgICAgICAgc3RvcCAxMwogICAgZW5kIHNlbGVjdAoKICBlbmQgc3Vicm91dGluZSBi YXIKZW5kIHByb2dyYW0K --------------ZUuwdq0Ua4rvfL56eioRw5QH--