diff options
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r-- | gcc/fortran/expr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 900242d..4516094 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -2227,6 +2227,11 @@ gfc_simplify_expr (gfc_expr *p, int type) if (!simplify_ref_chain (p->ref, type, &p)) return false; + /* If the following conditions hold, we found something like kind type + inquiry of the form a(2)%kind while simplify the ref chain. */ + if (p->expr_type == EXPR_CONSTANT && !p->ref && !p->rank && !p->shape) + return true; + if (!simplify_constructor (p->value.constructor, type)) return false; |