aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-array.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2018-02-03 14:06:44 +0000
committerPaul Thomas <pault@gcc.gnu.org>2018-02-03 14:06:44 +0000
commit2c536ce7b6a3a75ef4b43e94e1575122e3a962ca (patch)
treee186f448e47b52bfebd5c24a395b7ddecade22b5 /gcc/fortran/trans-array.c
parentd97aee74162a861e8930f353323d615d092076a3 (diff)
downloadgcc-2c536ce7b6a3a75ef4b43e94e1575122e3a962ca.zip
gcc-2c536ce7b6a3a75ef4b43e94e1575122e3a962ca.tar.gz
gcc-2c536ce7b6a3a75ef4b43e94e1575122e3a962ca.tar.bz2
re PR fortran/84141 (Internal error: type_name(): Bad type)
2018-02-03 Paul Thomas <pault@gcc.gnu.org> PR fortran/84141 PR fortran/84155 * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype use gfc_get_dtype_rank_type. 2018-02-03 Paul Thomas <pault@gcc.gnu.org> PR fortran/84141 PR fortran/84155 * gfortran.dg/pr84155.f90 : New test. From-SVN: r257356
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r--gcc/fortran/trans-array.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 4070341..c845bef 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -5354,8 +5354,8 @@ gfc_array_init_size (tree descriptor, int rank, int corank, tree * poffset,
}
else
{
- tmp = gfc_conv_descriptor_dtype (descriptor);
- gfc_add_modify (pblock, tmp, gfc_get_dtype (type));
+ tmp = gfc_get_dtype_rank_type (rank, gfc_get_element_type (type));
+ gfc_add_modify (pblock, gfc_conv_descriptor_dtype (descriptor), tmp);
}
or_expr = logical_false_node;