diff options
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 1ab0361..c8d74e5 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -3502,19 +3502,7 @@ gfc_conv_scalarized_array_ref (gfc_se * se, gfc_array_ref * ar) return; if (get_CFI_desc (NULL, expr, &decl, ar)) - { - decl = build_fold_indirect_ref_loc (input_location, decl); - goto done; - } - - if (expr && ((is_subref_array (expr) - && GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (info->descriptor))) - || (expr->ts.deferred && (expr->expr_type == EXPR_VARIABLE - || expr->expr_type == EXPR_FUNCTION)))) - decl = expr->symtree->n.sym->backend_decl; - - if (decl && GFC_DECL_PTR_ARRAY_P (decl)) - goto done; + decl = build_fold_indirect_ref_loc (input_location, decl); /* A pointer array component can be detected from its field decl. Fix the descriptor, mark the resulting variable decl and pass it to @@ -3532,7 +3520,6 @@ gfc_conv_scalarized_array_ref (gfc_se * se, gfc_array_ref * ar) decl = info->descriptor; } -done: se->expr = gfc_build_array_ref (base, index, decl); } @@ -7865,7 +7852,7 @@ array_parameter_size (tree desc, gfc_expr *expr, tree *size) } /* Helper function - return true if the argument is a pointer. */ - + static bool is_pointer (gfc_expr *e) { |