------- Comment #5 from janus at gcc dot gnu dot org 2009-08-14 19:26 ------- Simple patch (regtesting right now):
Index: gcc/fortran/resolve.c =================================================================== --- gcc/fortran/resolve.c (revision 150761) +++ gcc/fortran/resolve.c (working copy) @@ -830,8 +830,8 @@ resolve_structure_cons (gfc_expr *expr) /* See if the user is trying to invoke a structure constructor for one of the iso_c_binding derived types. */ - if (expr->ts.u.derived && expr->ts.u.derived->ts.is_iso_c && cons - && cons->expr != NULL) + if (expr->ts.type == BT_DERIVED && expr->ts.u.derived + && expr->ts.u.derived->ts.is_iso_c && cons && cons->expr != NULL) { gfc_error ("Components of structure constructor '%s' at %L are PRIVATE", expr->ts.u.derived->name, &(expr->where)); -- janus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |janus at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Last reconfirmed|2009-08-14 19:10:58 |2009-08-14 19:26:27 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41070