PR fortran/21730
* decl.c (do_parm): Adjust character initializer to character length
of symbol before assigning.
From-SVN: r102104
+2005-07-16 David Edelsohn <edelsohn@gnu.org>
+
+ PR fortran/21730
+ * decl.c (do_parm): Adjust character initializer to character length
+ of symbol before assigning.
+
2005-07-14 Steve Ellcey <sje@cup.hp.com>
* trans-types.c (MAX_REAL_KINDS): Increase from 4 to 5.
goto cleanup;
}
+ if (sym->ts.type == BT_CHARACTER
+ && sym->ts.cl != NULL
+ && sym->ts.cl->length != NULL
+ && sym->ts.cl->length->expr_type == EXPR_CONSTANT
+ && init->expr_type == EXPR_CONSTANT
+ && init->ts.type == BT_CHARACTER
+ && init->ts.kind == 1)
+ gfc_set_constant_character_len (
+ mpz_get_si (sym->ts.cl->length->value.integer), init);
+
sym->value = init;
return MATCH_YES;