aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-io.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2007-07-12 09:30:27 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2007-07-12 09:30:27 +0000
commit553b66ad1d40ff948dfe1215e38787c1799110ff (patch)
tree29c5b917bfe31c769ff547e9990987839016560a /gcc/fortran/trans-io.c
parent176be57beaed92f771fd7c86007363e17f65324e (diff)
downloadgcc-553b66ad1d40ff948dfe1215e38787c1799110ff.zip
gcc-553b66ad1d40ff948dfe1215e38787c1799110ff.tar.gz
gcc-553b66ad1d40ff948dfe1215e38787c1799110ff.tar.bz2
trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert arguments to gfc_charlen_type_node.
2007-07-12 Richard Guenther <rguenther@suse.de> * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert arguments to gfc_charlen_type_node. * trans-io.c (gfc_convert_array_to_string): Convert type size to gfc_array_index_type. From-SVN: r126575
Diffstat (limited to 'gcc/fortran/trans-io.c')
-rw-r--r--gcc/fortran/trans-io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c
index 00d0ebd..4d7695e 100644
--- a/gcc/fortran/trans-io.c
+++ b/gcc/fortran/trans-io.c
@@ -623,7 +623,8 @@ gfc_convert_array_to_string (gfc_se * se, gfc_expr * e)
}
tmp = TYPE_SIZE_UNIT (gfc_get_element_type (type));
- size = fold_build2 (MULT_EXPR, gfc_array_index_type, size, tmp);
+ size = fold_build2 (MULT_EXPR, gfc_array_index_type, size,
+ fold_convert (gfc_array_index_type, tmp));
se->string_length = fold_convert (gfc_charlen_type_node, size);
}