+2007-07-27 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/32903
+ * trans-decl.c (gfc_trans_deferred_vars): Set intent(out)
+ derived types as referenced, if they have the the default
+ initializer set.
+
2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* gfortran.h (generate_isocbinding_symbol): Constify.
* symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
generate_isocbinding_symbol): Likewise.
-2007-07-24 Paul Thomas <pault@gcc.gnu.org>
+2007-07-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31205
PR fortran/32842
/* If an INTENT(OUT) dummy of derived type has a default
initializer, it must be initialized here. */
- if (f->sym && f->sym->attr.referenced
- && f->sym->attr.intent == INTENT_OUT
+ if (f->sym && f->sym->attr.intent == INTENT_OUT
&& f->sym->ts.type == BT_DERIVED
&& !f->sym->ts.derived->attr.alloc_comp
&& f->sym->value)
gfc_expr *tmpe;
tree tmp, present;
gcc_assert (!f->sym->attr.allocatable);
+ gfc_set_sym_referenced (f->sym);
tmpe = gfc_lval_expr_from_sym (f->sym);
tmp = gfc_trans_assignment (tmpe, f->sym->value, false);