public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "janus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/44978] derived types are resolved more than once
Date: Fri, 09 Aug 2013 19:23:00 -0000	[thread overview]
Message-ID: <bug-44978-4-zjT1ZJBGUk@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-44978-4@http.gcc.gnu.org/bugzilla/>

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?


  parent reply	other threads:[~2013-08-09 19:23 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-44978-4@http.gcc.gnu.org/bugzilla/>
2013-04-13 11:15 ` [Bug fortran/44978] extended " janus at gcc dot gnu.org
2013-06-15 11:12 ` dominiq at lps dot ens.fr
2013-08-08 20:00 ` [Bug fortran/44978] " janus at gcc dot gnu.org
2013-08-08 21:24 ` janus at gcc dot gnu.org
2013-08-09  6:00 ` janus at gcc dot gnu.org
2013-08-09 13:37 ` janus at gcc dot gnu.org
2013-08-09 13:59 ` janus at gcc dot gnu.org
2013-08-09 15:03 ` mikael at gcc dot gnu.org
2013-08-09 19:23 ` janus at gcc dot gnu.org [this message]
2013-08-09 19:55 ` mikael at gcc dot gnu.org
2013-08-10  7:55 ` janus at gcc dot gnu.org
2013-08-11  8:54 ` janus at gcc dot gnu.org
2013-08-11 11:34 ` mikael at gcc dot gnu.org
2013-08-11 17:22 ` janus at gcc dot gnu.org
2013-08-11 19:12 ` mikael at gcc dot gnu.org
2013-08-13  9:38 ` dominiq at lps dot ens.fr
2013-08-13  9:40 ` dominiq at lps dot ens.fr
2013-08-13  9:54 ` dominiq at lps dot ens.fr
2013-08-13 14:14 ` dominiq at lps dot ens.fr
2015-01-15 18:44 ` janus at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-44978-4-zjT1ZJBGUk@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).