[Bug fortran/41070] [4.5 Regression] Error: Components of structure constructor '' at (1) are PRIVATE
janus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Aug 14 19:26:00 GMT 2009
------- 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
More information about the Gcc-bugs
mailing list