[PATCH] Fortran: fix initialization of allocatable non-deferred character [PR59252]
Harald Anlauf
anlauf@gmx.de
Fri Feb 7 20:47:11 GMT 2025
Hi Steve,
Am 07.02.25 um 21:39 schrieb Steve Kargl:
> On Fri, Feb 07, 2025 at 09:31:12PM +0100, Harald Anlauf wrote:
>>
>> Regtested on x86_64-pc-linux-gnu. OK for mainline?
>>
>
> Looks reasonable.
>
>> While it is a really old bug but wrong code, I'd like to backport
>> this also at least to 14-branch. Any reservations?
>
> If it passes regression testing, no reservations.
Will do, as usual.
>
>> - else if (init && cm->attr.allocatable && expr->expr_type == EXPR_NULL)
>> + else if (cm->attr.allocatable && expr->expr_type == EXPR_NULL
>> + && (init
>> + || (cm->ts.type == BT_CHARACTER
>> + && !(cm->ts.deferred || cm->attr.pdt_string))))
>> {
>> - /* NULL initialization for allocatable components. */
>> + /* NULL initialization for allocatable components.
>> + Deferred-length character is dealth with later. */
>
> s/dealth/dealt
Oops, now I see it, too.
Fixed and pushed as r15-7433-g818c36a85e3fae .
Thanks for the review!
Harald
More information about the Fortran
mailing list