aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6/gcc/fortran/trans-array.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.6/gcc/fortran/trans-array.c')
-rw-r--r--gcc-4.6/gcc/fortran/trans-array.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc-4.6/gcc/fortran/trans-array.c b/gcc-4.6/gcc/fortran/trans-array.c
index 86de8ab..a4be6e7 100644
--- a/gcc-4.6/gcc/fortran/trans-array.c
+++ b/gcc-4.6/gcc/fortran/trans-array.c
@@ -4722,7 +4722,7 @@ gfc_trans_auto_array_allocation (tree decl, gfc_symbol * sym,
gcc_assert (GFC_ARRAY_TYPE_P (type));
onstack = TREE_CODE (type) != POINTER_TYPE;
- gfc_start_block (&init);
+ gfc_init_block (&init);
/* Evaluate character string length. */
if (sym->ts.type == BT_CHARACTER
@@ -6772,7 +6772,16 @@ get_std_lbound (gfc_expr *expr, tree desc, int dim, bool assumed_size)
gfc_array_index_type, cond,
lbound, gfc_index_one_node);
}
- else if (expr->expr_type == EXPR_VARIABLE)
+
+ if (expr->expr_type == EXPR_FUNCTION)
+ {
+ /* A conversion function, so use the argument. */
+ gcc_assert (expr->value.function.isym
+ && expr->value.function.isym->conversion);
+ expr = expr->value.function.actual->expr;
+ }
+
+ if (expr->expr_type == EXPR_VARIABLE)
{
tmp = TREE_TYPE (expr->symtree->n.sym->backend_decl);
for (ref = expr->ref; ref; ref = ref->next)
@@ -6785,15 +6794,6 @@ get_std_lbound (gfc_expr *expr, tree desc, int dim, bool assumed_size)
}
return GFC_TYPE_ARRAY_LBOUND(tmp, dim);
}
- else if (expr->expr_type == EXPR_FUNCTION)
- {
- /* A conversion function, so use the argument. */
- expr = expr->value.function.actual->expr;
- if (expr->expr_type != EXPR_VARIABLE)
- return gfc_index_one_node;
- desc = TREE_TYPE (expr->symtree->n.sym->backend_decl);
- return get_std_lbound (expr, desc, dim, assumed_size);
- }
return gfc_index_one_node;
}