aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index 06f4d20..bf5b74d 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -1063,7 +1063,13 @@ find_array_section (gfc_expr *expr, gfc_ref *ref)
if (ref->u.ar.dimen_type[d] == DIMEN_VECTOR) /* Vector subscript. */
{
gcc_assert (begin);
- gcc_assert (begin->expr_type == EXPR_ARRAY);
+
+ if (begin->expr_type != EXPR_ARRAY)
+ {
+ t = FAILURE;
+ goto cleanup;
+ }
+
gcc_assert (begin->rank == 1);
gcc_assert (begin->shape);