Commit 8a272531 by Paul Thomas Committed by Jerry DeLisle

re PR fortran/35780 (internal compiler error for complicated PARAMETER expressions)

2008-12-22  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/35780
	* trans-decl.c (init_intent_out_dt): Allow for optional args.

From-SVN: r142889
parent 5d88d3be
2008-12-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35780
* trans-decl.c (init_intent_out_dt): Allow for optional args.
2008-12-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/38398
......
......@@ -2791,6 +2791,7 @@ init_intent_out_dt (gfc_symbol * proc_sym, tree body)
stmtblock_t fnblock;
gfc_formal_arglist *f;
tree tmp;
tree present;
gfc_init_block (&fnblock);
for (f = proc_sym->formal; f; f = f->next)
......@@ -2802,6 +2803,11 @@ init_intent_out_dt (gfc_symbol * proc_sym, tree body)
tmp = gfc_deallocate_alloc_comp (f->sym->ts.derived,
f->sym->backend_decl,
f->sym->as ? f->sym->as->rank : 0);
present = gfc_conv_expr_present (f->sym);
tmp = build3 (COND_EXPR, TREE_TYPE (tmp), present,
tmp, build_empty_stmt ());
gfc_add_expr_to_block (&fnblock, tmp);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment