aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/simplify.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/simplify.c')
-rw-r--r--gcc/fortran/simplify.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
index 0a32d6f..bffda59 100644
--- a/gcc/fortran/simplify.c
+++ b/gcc/fortran/simplify.c
@@ -3213,12 +3213,12 @@ gfc_simplify_shape (gfc_expr * source)
int n;
try t;
+ if (source->rank == 0 || source->expr_type != EXPR_VARIABLE)
+ return NULL;
+
result = gfc_start_constructor (BT_INTEGER, gfc_default_integer_kind (),
&source->where);
- if (source->rank == 0 || source->expr_type != EXPR_VARIABLE)
- return result;
-
ar = gfc_find_array_ref (source);
t = gfc_array_ref_shape (ar, shape);