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 00A22385696F for ; Wed, 5 Jul 2023 20:37:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 00A22385696F 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 1qH9FI-00054z-V6 for gcc-patches@gcc.gnu.org; Wed, 05 Jul 2023 22:37:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gcc-patches@gcc.gnu.org From: Harald Anlauf Subject: Re: [PATCH] Fortran: fixes for procedures with ALLOCATABLE,INTENT(OUT) arguments [PR92178] Date: Wed, 5 Jul 2023 22:36:57 +0200 Message-ID: References: <5a5306ae-0db1-c7e2-e744-a3beced17636@orange.fr> <3adc2904-9876-74d6-2b5d-3cc1896866c3@gmx.de> <3e31cc66-b7ae-adb0-f1a8-18b8bcc11c46@orange.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------KjS10ShNaSXnM0gusSLPcqEc" 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=-9.0 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,NICE_REPLY_A,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: Message-ID: <20230705203657.v5hy7z8HSjgpqce47Xw4GaAZ-td6ibXjTVbjS7iLdaA@z> This is a multi-part message in MIME format. --------------KjS10ShNaSXnM0gusSLPcqEc Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Mikael, Am 05.07.23 um 16:54 schrieb Mikael Morin: > Here is an example, admittedly artificial.  Fails with the above change, > but fails with master as well. > > program p >   implicit none >   type t >     integer :: i >   end type t >   type u >     class(t), allocatable :: ta(:) >   end type u >   type(u), allocatable, target :: c(:) >   c = [u([t(1), t(3)]), u([t(4), t(9)])] >   call bar (allocated (c(c(1)%ta(1)%i)%ta), c(c(1)%ta(1)%i)%ta, > allocated (c(c(1)%ta(1)%i)%ta)) >   if (allocated(c(1)%ta)) stop 11 >   if (.not. allocated(c(2)%ta)) stop 12 > contains >   subroutine bar (alloc, x, alloc2) >     logical :: alloc, alloc2 >     class(t), allocatable, intent(out) :: x(:) >     if (allocated (x)) stop 1 >     if (.not. alloc)   stop 2 >     if (.not. alloc2)  stop 3 >   end subroutine bar > end while it looks artificial, it is valid, and IMHO it is a beast... I've played around and added another argument gfc_se *convse to gfc_conv_class_to_class in an attempt to implement what I thought you suggested (to get the .pre/.post separately), but in the end this did not lead to working code. And the tree-dump for your example above is beyond what I can grasp. I've noticed that my attempt does not properly handle the parmse.post; at least this is what the above example shows: there is a small part after the call to bar that should have been executed before that call, which I attribute to .post. But my attempts in moving that part regresses on a couple of testcases with class and intent(out). I am at a loss now. I am attaching the latest version of my patch to give you or Paul or others the opportunity to see what is wrong or add the missing pieces. Thanks for your help so far. Harald --------------KjS10ShNaSXnM0gusSLPcqEc Content-Type: text/x-patch; charset=UTF-8; name="pr92178-v2.diff" Content-Disposition: attachment; filename="pr92178-v2.diff" Content-Transfer-Encoding: base64 RnJvbSA5ODkwMzBmYzA0ZWFjZjk3YTAzNGFiMWY3ZWQ4NWI5MzI2NjlmODJkIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBIYXJhbGQgQW5sYXVmIDxhbmxhdWZAZ214LmRlPgpE YXRlOi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icm91dGluZSBhc3NpZ24gKGEsIGkpCisgICAgaW50ZWdlciwgYWxsb2NhdGFibGUs IGludGVudChvdXQpIDo6IGEoOikgCisgICAgaW50ZWdlciwgICAgICAgICAgICAgIHZhbHVl ICA6OiBpCisgICAgayA9IGkKKyAgZW5kIHN1YnJvdXRpbmUKKworICBzdWJyb3V0aW5lIGZv byAoYWxsb2MsIHN6LCB0c3QsIHgsIGFsbG9jMikKKyAgICBsb2dpY2FsLCB2YWx1ZSA6OiBh bGxvYywgdHN0CisgICAgaW50ZWdlciwgdmFsdWUgOjogc3oKKyAgICBsb2dpY2FsICAgICAg ICA6OiBhbGxvYzIKKyAgICBpbnRlZ2VyLCBhbGxvY2F0YWJsZSwgaW50ZW50KG91dCkgOjog eCg6KQorICAgIGlmIChhbGxvY2F0ZWQgKHgpKSBzdG9wIDEKKyAgICBpZiAoLm5vdC4gYWxs b2MpICAgc3RvcCAyCisgICAgaWYgKHN6IC89IDIpICAgICAgIHN0b3AgMworICAgIGlmICgu bm90LiB0c3QpICAgICBzdG9wIDQKKyAgICBpZiAoLm5vdC4gYWxsb2MyKSAgc3RvcCAxNQor ICBlbmQgc3Vicm91dGluZSBmb28KKyAgIQorICBsb2dpY2FsIGZ1bmN0aW9uIHRlc3QgKHp6 KQorICAgIGludGVnZXIgOjogenooMikKKyAgICB0ZXN0ID0genooMikgPT0gMgorICBlbmQg ZnVuY3Rpb24gdGVzdAorICAhCisgIHN1YnJvdXRpbmUgYmFyIChhbGxvYywgc3osIHRzdCwg eCwgYWxsb2MyLCBzejIsIHRzdDIpCisgICAgbG9naWNhbCwgdmFsdWUgOjogYWxsb2MsIHRz dCwgYWxsb2MyLCB0c3QyCisgICAgaW50ZWdlciwgdmFsdWUgOjogc3osIHN6MgorICAgIGNs YXNzKCopLCBhbGxvY2F0YWJsZSwgaW50ZW50KG91dCkgOjogeCg6KQorICAgIGlmIChhbGxv Y2F0ZWQgKHgpKSBzdG9wIDUKKyAgICBpZiAoLm5vdC4gYWx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aSAvPSAxKSBzdG9wIDEKKyAgaWYgKGFzc29jaWF0ZWQodGElcGkpKSBzdG9w IDIKK2NvbnRhaW5zCisgIHN1YnJvdXRpbmUgYXNzaWduKGEsIGIpCisgICAgdHlwZSh0KSwg aW50ZW50KG91dCksIGFsbG9jYXRhYmxlIDo6IGEKKyAgICBpbnRlZ2VyLCBpbnRlbnQoaW4p ICwgdmFsdWUgICAgICAgOjogYgorICAgIGFsbG9jYXRlKGEpCisgICAgYSVpID0gYgorICAg IGElcGkgPT4gbnVsbCgpCisgIGVuZCBzdWJyb3V0aW5lIGFzc2lnbgorICBmdW5jdGlvbiBp ZChhKQorICAgIGludGVnZXIsIHBvaW50ZXIgOjogaWQsIGEKKyAgICBpZCA9PiBhCisgIGVu ZCBmdW5jdGlvbiBpZAorZW5kIHByb2dyYW0gcAotLSAKMi4zNS4zCgo= --------------KjS10ShNaSXnM0gusSLPcqEc--