*Ping*

Am 03.10.21 um 21:20 schrieb Harald Anlauf via Fortran:
Dear Fortranners,

when initializing parameter arrays from scalars, we did handle only
the case init->expr_type == EXPR_CONSTANT, which misses the case of
derived types.  As a consequence the constructor for the r.h.s. was
not set up, which later led to different ICEs.

To solve this I looked at gfc_simplify_spread.  I was contemplating
whether to also copy the logic to make this initialization dependent
on -fmax-array-constructor.  I chose not to, because there is no
sensible and simple fallback available to handle that case while
allowing the access to array elements.  We could instead make that
a warning.

Comments / opinions?

Regtested on x86_64-pc-linux-gnu.  OK for mainline?

As this is an ICE on valid, potentially useful code,
I'd like to backport this to 11-branch.

Thanks,
Harald



Reply via email to