aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-array.c
diff options
context:
space:
mode:
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 71e0482..287b4af 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -3821,10 +3821,10 @@ evaluate_bound (stmtblock_t *block, tree *bounds, gfc_expr ** values,
gfc_add_block_to_block (block, &se.pre);
*output = se.expr;
}
- else if (deferred)
+ else if (deferred && GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (desc)))
{
/* The gfc_conv_array_lbound () routine returns a constant zero for
- deferred length arrays, which in the scalarizer wrecks havoc, when
+ deferred length arrays, which in the scalarizer wreaks havoc, when
copying to a (newly allocated) one-based array.
Keep returning the actual result in sync for both bounds. */
*output = lbound ? gfc_conv_descriptor_lbound_get (desc,