aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-stmt.c
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-05-23 08:25:05 +0000
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-05-23 08:25:05 +0000
commit7c57b2f1f4f9662321195809b62290d9f173c237 (patch)
treec2f6105c7efa6a1cabed4d61f20857cf14412dac /gcc/fortran/trans-stmt.c
parent6d0ceb7638fa91572e3fb39d957f0ff404bc4619 (diff)
downloadgcc-7c57b2f1f4f9662321195809b62290d9f173c237.zip
gcc-7c57b2f1f4f9662321195809b62290d9f173c237.tar.gz
gcc-7c57b2f1f4f9662321195809b62290d9f173c237.tar.bz2
re PR fortran/32046 (wrong code with -O2 for gfortran.dg/interface_12.f90 & result_in_spec_1.f90)
PR fortran/32046 * trans-expr.c (gfc_trans_zero_assign): Convert the result of TYPE_SIZE_UNIT into a signed type. (gfc_trans_array_copy): Likewise. (gfc_trans_array_constructor_copy): Likewise. * trans-array.c (gfc_trans_create_temp_array): Likewise. (gfc_grow_array): Likewise. (gfc_array_init_size): Likewise. (gfc_duplicate_allocatable): Likewise. * trans-stmt.c (allocate_temp_for_forall_nest_1): Likewise. From-SVN: r124985
Diffstat (limited to 'gcc/fortran/trans-stmt.c')
-rw-r--r--gcc/fortran/trans-stmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
index 444d880..ec7548e 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -2086,7 +2086,7 @@ allocate_temp_for_forall_nest_1 (tree type, tree size, stmtblock_t * block,
tree unit;
tree tmp;
- unit = TYPE_SIZE_UNIT (type);
+ unit = fold_convert (gfc_array_index_type, TYPE_SIZE_UNIT (type));
if (!integer_onep (unit))
bytesize = fold_build2 (MULT_EXPR, gfc_array_index_type, size, unit);
else