diff options
Diffstat (limited to 'gcc/fortran/trans.c')
-rw-r--r-- | gcc/fortran/trans.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c index e7844c9..0d786d9 100644 --- a/gcc/fortran/trans.c +++ b/gcc/fortran/trans.c @@ -418,7 +418,8 @@ gfc_build_array_ref (tree base, tree offset, tree decl, tree vptr) tmp = gfc_build_addr_expr (pvoid_type_node, base); tmp = fold_build_pointer_plus_loc (input_location, tmp, offset); tmp = fold_convert (build_pointer_type (type), tmp); - if (!TYPE_STRING_FLAG (type)) + if ((TREE_CODE (type) != INTEGER_TYPE && TREE_CODE (type) != ARRAY_TYPE) + || !TYPE_STRING_FLAG (type)) tmp = build_fold_indirect_ref_loc (input_location, tmp); return tmp; } |