Commit r16-3499 introduced a regression on targets where truncation of a
string argument passed to a CHARACTER(len=1),VALUE dummy argument missed
the special treatment needed for passing single characters.
PR fortran/123201
gcc/fortran/ChangeLog:
* trans-expr.cc (conv_dummy_value): Convert string of length 1 to a
single character for passing as actual argument.
e->value.character.string);
parmse->string_length = build_int_cst (gfc_charlen_type_node, flen);
+ if (flen == 1)
+ {
+ tree slen1 = build_int_cst (gfc_charlen_type_node, 1);
+ gfc_conv_string_parameter (parmse);
+ parmse->expr = gfc_string_to_single_character (slen1, parmse->expr,
+ e->ts.kind);
+ }
+
/* Indicate value,optional scalar dummy argument as present. */
if (fsym->attr.optional)
vec_safe_push (optionalargs, boolean_true_node);