This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Thanks. Can you please tell me if this patch fixes the problem for you?
Index: gcc/fortran/resolve.c =================================================================== --- gcc/fortran/resolve.c (revision 163901) +++ gcc/fortran/resolve.c (working copy) @@ -6727,7 +6727,7 @@ resolve_allocate_expr (gfc_expr *e, gfc_code *code if (ts.type == BT_CLASS) ts = ts.u.derived->components->ts;
- if (ts.type == BT_DERIVED) + if (ts.type == BT_DERIVED&& gfc_has_default_initializer(ts.u.derived)) { code->expr3 = gfc_default_initializer (&ts); gfc_resolve_expr (code->expr3);
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |