From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 928333858C2A; Sat, 24 Jun 2023 13:19:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 928333858C2A Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1b7e66ff65fso2111905ad.0; Sat, 24 Jun 2023 06:19:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687612745; x=1690204745; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=5OIFZ8EnoWfG8nFPBA5GpFqqKmR/3z2DEBex4hJap70=; b=RhiHtIeZ12k1ikNHi9wFktNpHY34eMJO9NsoualwiUuGBzpWF2OoXYeEB8Py4RxN+k xqpxyTDfxbDhQ0LVhdOYs9r7Mr92YYfO66hfVRN292p61fkHHF6fSVYhszk0GHkfFg7l GKpgMt0wP1Uk7OCu9IKN0BsHq/Vj39+G6PeLH5ou0dRJDoIobUREzxsr9wE/h9NPZ+qB M6HJwNQGpjS1iAvlHMEPU3iB/3x0xaIwe38OUjwOEErdn5+hChK2OBOSatPJqQ4HgUFE jt8e7IsnXCOBOWzmWGNVjQyzM3EHLraawUNYc6a4yJ0QgHYTpL3hhLmv74+QcoPluCIY 8Vfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687612745; x=1690204745; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=5OIFZ8EnoWfG8nFPBA5GpFqqKmR/3z2DEBex4hJap70=; b=IL+Blk/zAY7Ja6omnmHYtQaRh5HNMS5vcVqqn2qiNM/34YZ5hfcbXs5LjljYLBMyf3 OtbknLQRKaCUcLQ14+MwS8dtpVAEV58Yuh6NASkBTabGNeFEDToz2M0J3ihljNdcVFho zuBwJSt84Hz8GKofvWt9KzjhkXsUcvnQ8uFvGn4i5dsk4BNEp82hGp9/7IjUZhbZmhVP JV2hqPm9nTt+2WARBfDOp7xPFhmtLtMzKQFgBLUfUvXhPxGn8BFNx95qOOXJoT7Rp5ZS z40sCJsnhDTWBgrbrDQqfnz5NRRrgEYRtVXz+4DgO2cvPenRESAj8t44bLwiDa5V4nOF YpYg== X-Gm-Message-State: AC+VfDwx85VQ7XfmVHFdjRWuWPD8NtLHgc0MMyn4fS2NRS8323VFegqk hErxjh8is9sZaLUiw9CyvkpVZhoKEduVKPY6CjkogUcYLeI= X-Google-Smtp-Source: ACHHUZ4cMjh9kXcINLeyUAxLXWzoRh6LT+o7xZc48j0nXbnpozeGE28fRYQYlYeBbGpLwH6qkL2sko97CvoC8xksqB0= X-Received: by 2002:a17:903:2793:b0:1b3:f8db:6f0c with SMTP id jw19-20020a170903279300b001b3f8db6f0cmr1809628plb.58.1687612745525; Sat, 24 Jun 2023 06:19:05 -0700 (PDT) MIME-Version: 1.0 From: Paul Richard Thomas Date: Sat, 24 Jun 2023 14:18:54 +0100 Message-ID: Subject: [Patch, fortran] PR49213 - [OOP] gfortran rejects structure constructor expression To: "fortran@gcc.gnu.org" , gcc-patches , Harald Anlauf Content-Type: multipart/mixed; boundary="000000000000376ffc05fedff620" X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,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: --000000000000376ffc05fedff620 Content-Type: text/plain; charset="UTF-8" Hi All, I was looking through Neil Carlson's collection of gfortran bugs and was shocked to find this rather fundamental PR. At 12 years old, it is certainly a "golden oldie"! The patch is rather straightforward and seems to do the job of admitting derived, intrinsic and character expressions to allocatable class components in structure constructors. 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. 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 --000000000000376ffc05fedff620 Content-Type: text/x-patch; charset="US-ASCII"; name="pr49213.diff" Content-Disposition: attachment; filename="pr49213.diff" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lja11ebe0 ZGlmZiAtLWdpdCBhL2djYy9mb3J0cmFuL2V4cHIuY2MgYi9nY2MvZm9ydHJhbi9leHByLmNjCmlu ZGV4IGM5NjBkZmVhYmQ5Li45MjA2MWQ2OTc4MSAxMDA2NDQKLS0tIGEvZ2NjL2ZvcnRyYW4vZXhw ci5jYworKysgYi9nY2MvZm9ydHJhbi9leHByLmNjCkBAIC04MTYsNyArODE2LDcgQEAgYm9vbAog Z2ZjX2lzX3B0cl9mY24gKGdmY19leHByICplKQogewogICByZXR1cm4gZSAhPSBOVUxMICYmIGUt PmV4cHJfdHlwZSA9PSBFWFBSX0ZVTkNUSU9OCi0JICAgICAgJiYgKGdmY19leHByX2F0dHI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S5leHByKSk7Cg== --000000000000376ffc05fedff620 Content-Type: text/x-fortran; charset="US-ASCII"; name="pr49213.f90" Content-Disposition: attachment; filename="pr49213.f90" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lja11mgh1 ISB7IGRnLWRvIHJ1biB9CiEKISBDb250cmlidXRlZCBieSBOZWlsIENhcmxzb24gIDxuZWlsLm4u Y2FybHNvbkBnbWFpbC5jb20+CiEKcHJvZ3JhbSBtYWluCiAgY2hhcmFjdGVyKDIpIDo6IGMKCiAg dHlwZSA6OiBTCiAgICBpbnRlZ2VyIDo6IG4KICBlbmQgdHlwZQogIHR5cGUoUykgOjogU29iagoK ICB0eXBlLCBleHRlbmRzKFMpIDo6IFMyCiAgICBpbnRlZ2VyIDo6IG0KICBlbmQgdHlwZQogIHR5 cGUoUzIpIDo6IFMyb2JqCgogIHR5cGUgOjogVAogICAgY2xhc3MoUyksIGFsbG9jYXRhYmxlIDo6 IHgKICBlbmQgdHlwZQogIHR5cGUoVCkgOjogVG9iagoKICBTb2JqID0gUygxKQogIFRvYmogPSBU KFNvYmopCgogIFMyb2JqID0gUzIoMSwyKQogIFRvYmogPSBUKFMyb2JqKSAgICAgICAgICAgICEg RmFpbGVkIGhlcmUKICBzZWxlY3QgdHlwZSAoeCA9PiBUb2JqJXgpCiAgICB0eXBlIGlzIChTMikK ICAgICAgaWYgKCh4JW4gLm5lLiAxKSAub3IuICh4JW0gLm5lLiAyKSkgc3RvcCAxCiAgICBjbGFz cyBkZWZhdWx0CiAgICAgIHN0b3AgMgogIGVuZCBzZWxlY3QKCiAgYyA9ICIgICIKICBjYWxsIHBh c3NfaXQgKFQoU29iaikpCiAgaWYgKGMgLm5lLiAiUyAiKSBzdG9wIDMKICBjYWxsIHBhc3NfaXQg KFQoUzJvYmopKSAgICAhIGFuZCBoZXJlCiAgaWYgKGMgLm5lLiAiUzIiKSBzdG9wIDQKCiAgY2Fs bCBiYXIKCmNvbnRhaW5zCgogIHN1YnJvdXRpbmUgcGFzc19pdCAoZm9vKQogICAgdHlwZShUKSwg aW50ZW50KGluKSA6OiBmb28KICAgIHNlbGVjdCB0eXBlICh4ID0+IGZvbyV4KQogICAgICB0eXBl IGlzIChTKQogICAgICAgIGMgPSAiUyAiCiAgICAgICAgaWYgKHglbiAubmUuIDEpIHN0b3AgNQog ICAgICB0eXBlIGlzIChTMikKICAgICAgICBjID0gIlMyIgogICAgICAgIGlmICgoeCVuIC5uZS4g MSkgLm9yLiAoeCVtIC5uZS4gMikpIHN0b3AgNgogICAgICBjbGFzcyBkZWZhdWx0CiAgICAgICAg c3RvcCA3CiAgICBlbmQgc2VsZWN0CiAgZW5kIHN1YnJvdXRpbmUKCiAgc3Vicm91dGluZSBiYXIK ICAgISBUZXN0IGZyb20gY29tbWVudCAjMjkgb2YgdGhlIFBSIC0gZHVlIHRvIEphbnVzIFdlaWwK ICAgIHR5cGUgdENvbnRhaW5lcgogICAgICBjbGFzcygqKSwgYWxsb2NhdGFibGUgOjogeAogICAg ZW5kIHR5cGUKICAgIGludGVnZXIsIHBhcmFtZXRlciA6OiBpID0gMAogICAgY2hhcmFjdGVyKDcp IDo6IGNociA9ICJnb29kYnllIgogICAgdHlwZSh0Q29udGFpbmVyKSA6OiBjb250CgogICAgY29u dCV4ID0gaSAhIGxpbmtlciBlcnJvcjogdW5kZWZpbmVkIHJlZmVyZW5jZSB0byBgX19jb3B5X0lO VEVHRVJfNF8uMzgwNCcKCiAgICBjb250ID0gdENvbnRhaW5lcihpKzQyKSAhIEZhaWxlZCBoZXJl CiAgICBzZWxlY3QgdHlwZSAoeiA9PiBjb250JXgpCiAgICAgIHR5cGUgaXMgKGludGVnZXIpCiAg ICAgICAgaWYgKHogLm5lLiA0Mikgc3RvcCA4CiAgICAgIGNsYXNzIGRlZmF1bHQKICAgICAgICBz dG9wIDkKICAgIGVuZCBzZWxlY3QKCiAgICBjb250ID0gdENvbnRhaW5lcignaGVsbG8hJykKICAg IHNlbGVjdCB0eXBlICh6ID0+IGNvbnQleCkKICAgICAgdHlwZSBpcyAoY2hhcmFjdGVyKCopKQog ICAgICAgIGlmICh6IC5uZS4gJ2hlbGxvIScpIHN0b3AgMTAKICAgICAgY2xhc3MgZGVmYXVsdAog ICAgICAgIHN0b3AgMTEKICAgIGVuZCBzZWxlY3QKCiAgICBjb250ID0gdENvbnRhaW5lcihjaHIp CiAgICBzZWxlY3QgdHlwZSAoeiA9PiBjb250JXgpCiAgICAgIHR5cGUgaXMgKGNoYXJhY3Rlcigq KSkKICAgICAgICBpZiAoeiAubmUuICdnb29kYnllJykgc3RvcCAxMgogICAgICBjbGFzcyBkZWZh dWx0CiAgICAgICAgc3RvcCAxMwogICAgZW5kIHNlbGVjdAoKICBlbmQgc3Vicm91dGluZSBiYXIK ZW5kIHByb2dyYW0K --000000000000376ffc05fedff620--