HI Harald,
When substituting an array-valued character parameter variable, the call to
gfc_copy_expr returns character length 1. Fix up the resulting length.
I could not figure out whether this is a bug or a feature of gfc_copy_expr.
But the fix to simplify_parameter_variable would not do any harm in any case.
Thanks for your analysis!
I don't think that this is a feature of gfc_copy_expr, I think it is a
bug which probably also bites us in other circumstances which we may
work around in other places and/or which causes other instances of
wrong code.
So, I'd very much prefer that the character length is set correctly
in gfc_copy_expr. If that works, we should definitely backport
to all open branches.
Best regards
Thomas