diff options
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index b2992f0..d83a7a9 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -2628,7 +2628,7 @@ gfc_conv_array_ref (gfc_se * se, gfc_array_ref * ar, gfc_symbol * sym, se->expr = build_fold_indirect_ref_loc (input_location, se->expr); /* Use the actual tree type and not the wrapped coarray. */ - se->expr = fold_convert (TREE_TYPE (TREE_TYPE (se->expr)), se->expr); + se->expr = fold_convert (TYPE_MAIN_VARIANT (TREE_TYPE (se->expr)), se->expr); return; } |