diff options
Diffstat (limited to 'gcc/fortran/iresolve.c')
-rw-r--r-- | gcc/fortran/iresolve.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/fortran/iresolve.c b/gcc/fortran/iresolve.c index 77cdce5..11f2569 100644 --- a/gcc/fortran/iresolve.c +++ b/gcc/fortran/iresolve.c @@ -82,7 +82,7 @@ check_charlen_present (gfc_expr *source) if (source->expr_type == EXPR_CONSTANT) { source->ts.u.cl->length - = gfc_get_int_expr (gfc_default_integer_kind, NULL, + = gfc_get_int_expr (gfc_charlen_int_kind, NULL, source->value.character.length); source->rank = 0; } @@ -90,7 +90,7 @@ check_charlen_present (gfc_expr *source) { gfc_constructor *c = gfc_constructor_first (source->value.constructor); source->ts.u.cl->length - = gfc_get_int_expr (gfc_default_integer_kind, NULL, + = gfc_get_int_expr (gfc_charlen_int_kind, NULL, c->expr->value.character.length); } } @@ -247,7 +247,7 @@ gfc_resolve_char_achar (gfc_expr *f, gfc_expr *x, gfc_expr *kind, f->ts.kind = (kind == NULL) ? gfc_default_character_kind : mpz_get_si (kind->value.integer); f->ts.u.cl = gfc_new_charlen (gfc_current_ns, NULL); - f->ts.u.cl->length = gfc_get_int_expr (gfc_default_integer_kind, NULL, 1); + f->ts.u.cl->length = gfc_get_int_expr (gfc_charlen_int_kind, NULL, 1); f->value.function.name = gfc_get_string ("__%schar_%d_%c%d", is_achar ? "a" : "", f->ts.kind, @@ -2243,7 +2243,6 @@ void gfc_resolve_repeat (gfc_expr *f, gfc_expr *string, gfc_expr *ncopies) { - int len; gfc_expr *tmp; f->ts.type = BT_CHARACTER; f->ts.kind = string->ts.kind; @@ -2256,8 +2255,8 @@ gfc_resolve_repeat (gfc_expr *f, gfc_expr *string, tmp = NULL; if (string->expr_type == EXPR_CONSTANT) { - len = string->value.character.length; - tmp = gfc_get_int_expr (gfc_default_integer_kind, NULL , len); + tmp = gfc_get_int_expr (gfc_charlen_int_kind, NULL, + string->value.character.length); } else if (string->ts.u.cl && string->ts.u.cl->length) { @@ -3023,14 +3022,14 @@ gfc_resolve_transfer (gfc_expr *f, gfc_expr *source ATTRIBUTE_UNUSED, if (mold->expr_type == EXPR_CONSTANT) { len = mold->value.character.length; - mold->ts.u.cl->length = gfc_get_int_expr (gfc_default_integer_kind, + mold->ts.u.cl->length = gfc_get_int_expr (gfc_charlen_int_kind, NULL, len); } else { gfc_constructor *c = gfc_constructor_first (mold->value.constructor); len = c->expr->value.character.length; - mold->ts.u.cl->length = gfc_get_int_expr (gfc_default_integer_kind, + mold->ts.u.cl->length = gfc_get_int_expr (gfc_charlen_int_kind, NULL, len); } } |