This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/42353] [OOP] Bogus Error: Name 'vtype$...' at (1) is an ambiguous reference ...



------- Comment #3 from janus at gcc dot gnu dot org  2009-12-13 21:09 -------
One can get rid of this by making the vtypes private:

Index: gcc/fortran/symbol.c
===================================================================
--- gcc/fortran/symbol.c        (revision 155182)
+++ gcc/fortran/symbol.c        (working copy)
@@ -4764,6 +4764,7 @@ gfc_find_derived_vtab (gfc_symbol *derived)
                return NULL;
              vtype->refs++;
              gfc_set_sym_referenced (vtype);
+             vtype->attr.access = ACCESS_PRIVATE;

              /* Add component '$hash'.  */
              if (gfc_add_component (vtype, "$hash", &c) == FAILURE)

This patch fixes the error and is regression free.


-- 

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-12-11 23:13:39         |2009-12-13 21:09:52
               date|                            |


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]