aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran/array.c')
-rw-r--r--gcc/fortran/array.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c
index 031ab76..e4926d7 100644
--- a/gcc/fortran/array.c
+++ b/gcc/fortran/array.c
@@ -2040,7 +2040,9 @@ got_charlen:
gfc_ref *ref;
for (ref = p->expr->ref; ref; ref = ref->next)
if (ref->type == REF_SUBSTRING
+ && ref->u.ss.start
&& ref->u.ss.start->expr_type == EXPR_CONSTANT
+ && ref->u.ss.end
&& ref->u.ss.end->expr_type == EXPR_CONSTANT)
break;