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

--- Comment #9 from janus at gcc dot gnu.org ---
(In reply to Mikael Morin from comment #8)
> > @@ -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.

That's true, but I'm not sure that it is really a problem (at least the
gfortran testsuite does not seem to have a problem with it).

Do you have a simple idea how to improve the patch in this regard? Or can you
give an example where it would create a problem?

Reply via email to