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.
> - 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
--
Steve