From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7621 invoked by alias); 9 Aug 2013 15:03:22 -0000 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 Received: (qmail 7165 invoked by uid 48); 9 Aug 2013 15:03:16 -0000 From: "mikael at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/44978] derived types are resolved more than once Date: Fri, 09 Aug 2013 15:03:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.6.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: mikael at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: janus at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-08/txt/msg00552.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44978 Mikael Morin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mikael at gcc dot gnu.org --- Comment #8 from Mikael Morin --- I'm not convinced by the following: (In reply to janus from comment #6) > @@ -11962,6 +11957,10 @@ resolve_fl_derived0 (gfc_symbol *sym) > gfc_symbol* super_type; > gfc_component *c; > > + if (sym->resolved>1) > + return true; > + sym->resolved = 2; > + > if (sym->attr.unlimited_polymorphic) > return true; The first time we hit the function, sym->resolved is set to 2. Suppose that an error is issued, and the function returns false. Then, on the next time the function is called with the same symbol argument, no error is issued (this is the purpose of the patch), but as a side effect the function will return true, so that the caller will proceed as if the symbol was well formed.