aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-array.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r--gcc/fortran/trans-array.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 26f0523..fc628ca 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -7341,8 +7341,8 @@ duplicate_allocatable (tree dest, tree src, tree type, int rank,
}
tmp = builtin_decl_explicit (BUILT_IN_MEMCPY);
- tmp = build_call_expr_loc (input_location, tmp, 3,
- dest, src, size);
+ tmp = build_call_expr_loc (input_location, tmp, 3, dest, src,
+ fold_convert (size_type_node, size));
}
else
{
@@ -7367,7 +7367,8 @@ duplicate_allocatable (tree dest, tree src, tree type, int rank,
tmp = builtin_decl_explicit (BUILT_IN_MEMCPY);
tmp = build_call_expr_loc (input_location,
tmp, 3, gfc_conv_descriptor_data_get (dest),
- gfc_conv_descriptor_data_get (src), size);
+ gfc_conv_descriptor_data_get (src),
+ fold_convert (size_type_node, size));
}
gfc_add_expr_to_block (&block, tmp);