[Bug fortran/49112] [4.6/4.7 Regression] [OOP] Missing type-bound procedure, "duplicate save" warnings and internal compiler error

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 30 20:11:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49112

--- Comment #10 from janus at gcc dot gnu.org 2011-05-30 20:09:18 UTC ---
(In reply to comment #6)
> > 
> >         string = dt%getFormattedString(0, FMT)
> >                                       1
> > Error: 'getformattedstring' at (1) is not a member of the 'datetime' structure
> 
> Here is a reduced test case for this error, which is also a regression:

... probably due to my r163631:

http://gcc.gnu.org/viewcvs?view=revision&revision=163631


It can be fixed by this partial revert:

===================================================================
--- gcc/fortran/resolve.c    (revision 174415)
+++ gcc/fortran/resolve.c    (working copy)
@@ -964,9 +964,6 @@ resolve_structure_cons (gfc_expr *expr, int init)

   t = SUCCESS;

-  if (expr->ts.type == BT_DERIVED)
-    resolve_symbol (expr->ts.u.derived);
-
   cons = gfc_constructor_first (expr->value.constructor);
   /* A constructor may have references if it is the result of substituting a
      parameter variable.  In this case we just pull out the component we



More information about the Gcc-bugs mailing list