diff options
Diffstat (limited to 'gcc/fortran/frontend-passes.c')
-rw-r--r-- | gcc/fortran/frontend-passes.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c index 29e43a1..3892069 100644 --- a/gcc/fortran/frontend-passes.c +++ b/gcc/fortran/frontend-passes.c @@ -616,6 +616,7 @@ create_var (gfc_expr * e, const char *vname) gfc_code *n; gfc_namespace *ns; int i; + bool deferred; if (e->expr_type == EXPR_CONSTANT || is_fe_temp (e)) return gfc_copy_expr (e); @@ -666,6 +667,7 @@ create_var (gfc_expr * e, const char *vname) } } + deferred = 0; if (e->ts.type == BT_CHARACTER && e->rank == 0) { gfc_expr *length; @@ -675,7 +677,10 @@ create_var (gfc_expr * e, const char *vname) if (length) symbol->ts.u.cl->length = length; else - symbol->attr.allocatable = 1; + { + symbol->attr.allocatable = 1; + deferred = 1; + } } symbol->attr.flavor = FL_VARIABLE; @@ -687,6 +692,7 @@ create_var (gfc_expr * e, const char *vname) result = gfc_get_expr (); result->expr_type = EXPR_VARIABLE; result->ts = e->ts; + result->ts.deferred = deferred; result->rank = e->rank; result->shape = gfc_copy_shape (e->shape, e->rank); result->symtree = symtree; |