From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1819 invoked by alias); 16 Dec 2009 21:16:26 -0000 Received: (qmail 1758 invoked by uid 48); 16 Dec 2009 21:16:14 -0000 Date: Wed, 16 Dec 2009 21:16:00 -0000 Message-ID: <20091216211614.1757.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/42353] [OOP] Bogus Error: Name 'vtype$...' at (1) is an ambiguous reference ... In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "anlauf at gmx dot de" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-12/txt/msg01634.txt.bz2 ------- Comment #5 from anlauf at gmx dot de 2009-12-16 21:16 ------- (In reply to comment #3) > 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. I just tried the patch on my original example and found that this fixes the first error. But I am still left with: gfcbug96.f90:43.23: use concrete_gradient 1 Error: The element in the derived type constructor at (1), for pointer component '$extends', is DERIVED but should be DERIVED -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42353