frontend-passes.c (create_var): Set ts.deferred for deferred-length character variables.
2016-08-15 Thomas Koenig <tkoenig@gcc.gnu.org> * frontend-passes.c (create_var): Set ts.deferred for deferred-length character variables. * dump-parse-tree.c (show_typespec): Also dump is_c_interop, is_iso_c and deferred flags. From-SVN: r239488
This commit is contained in:
parent
432baa029c
commit
874be74ab3
@ -1,3 +1,10 @@
|
||||
2016-08-15 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||
|
||||
* frontend-passes.c (create_var): Set ts.deferred for
|
||||
deferred-length character variables.
|
||||
* dump-parse-tree.c (show_typespec): Also dump
|
||||
is_c_interop, is_iso_c and deferred flags.
|
||||
|
||||
2016-08-15 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR debug/71906
|
||||
|
@ -120,6 +120,14 @@ show_typespec (gfc_typespec *ts)
|
||||
fprintf (dumpfile, "%d", ts->kind);
|
||||
break;
|
||||
}
|
||||
if (ts->is_c_interop)
|
||||
fputs (" C_INTEROP", dumpfile);
|
||||
|
||||
if (ts->is_iso_c)
|
||||
fputs (" ISO_C", dumpfile);
|
||||
|
||||
if (ts->deferred)
|
||||
fputs (" DEFERRED", dumpfile);
|
||||
|
||||
fputc (')', dumpfile);
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user