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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
index 815043b..683d58b 100644
--- a/gcc/fortran/simplify.c
+++ b/gcc/fortran/simplify.c
@@ -5717,7 +5717,7 @@ gfc_simplify_storage_size (gfc_expr *x,
if (x->ts.type == BT_CLASS || x->ts.deferred)
return NULL;
- if (x->ts.type == BT_CHARACTER
+ if (x->ts.type == BT_CHARACTER && x->expr_type != EXPR_CONSTANT
&& (!x->ts.u.cl || !x->ts.u.cl->length
|| x->ts.u.cl->length->expr_type != EXPR_CONSTANT))
return NULL;