diff options
Diffstat (limited to 'gcc/fortran/expr.cc')
-rw-r--r-- | gcc/fortran/expr.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/expr.cc b/gcc/fortran/expr.cc index ed82a94..c9c0ba4 100644 --- a/gcc/fortran/expr.cc +++ b/gcc/fortran/expr.cc @@ -1718,7 +1718,13 @@ find_array_section (gfc_expr *expr, gfc_ref *ref) } cons = gfc_constructor_lookup (base, limit); - gcc_assert (cons); + if (cons == NULL) + { + gfc_error ("Error in array constructor referenced at %L", + &ref->u.ar.where); + t = false; + goto cleanup; + } gfc_constructor_append_expr (&expr->value.constructor, gfc_copy_expr (cons->expr), NULL); } |