[Bug fortran/55199] [OOP] Equivalenced variable has wrong type when used with generic member function

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Nov 4 12:43:00 GMT 2012


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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |janus at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #3 from janus at gcc dot gnu.org 2012-11-04 12:43:31 UTC ---
Draft patch:


Index: gcc/fortran/parse.c
===================================================================
--- gcc/fortran/parse.c    (revision 193047)
+++ gcc/fortran/parse.c    (working copy)
@@ -3394,13 +3394,6 @@ parse_associate (void)
       sym->assoc = a;
       sym->declared_at = a->where;
       gfc_set_sym_referenced (sym);
-
-      /* Initialize the typespec.  It is not available in all cases,
-     however, as it may only be set on the target during resolution.
-     Still, sometimes it helps to have it right now -- especially
-     for parsing component references on the associate-name
-     in case of association to a derived-type.  */
-      sym->ts = a->target->ts;
     }

   accept_statement (ST_ASSOCIATE);


regtesting now ...



More information about the Gcc-bugs mailing list