public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "janus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/45420] [OOP] poylmorphic TBP calls in a CLASS DEFAULT clause Date: Thu, 26 Aug 2010 19:55:00 -0000 [thread overview] Message-ID: <20100826195540.31314.qmail@sourceware.org> (raw) In-Reply-To: <bug-45420-16146@http.gcc.gnu.org/bugzilla/> ------- Comment #2 from janus at gcc dot gnu dot org 2010-08-26 19:55 ------- It turns out this bug is rather easy to fix. The problem was the we used the temporary needed for the TYPE IS clause also in the CLASS DEFAULT clause (where we need none). The following patch fixes it (haven't checked for regressions yet): Index: gcc/fortran/match.c =================================================================== --- gcc/fortran/match.c (revision 163470) +++ gcc/fortran/match.c (working copy) @@ -4460,6 +4460,12 @@ select_type_set_tmp (gfc_typespec *ts) char name[GFC_MAX_SYMBOL_LEN]; gfc_symtree *tmp; + if (!ts) + { + select_type_stack->tmp = NULL; + return; + } + if (!gfc_type_is_extensible (ts->u.derived)) return; @@ -4702,6 +4708,7 @@ gfc_match_class_is (void) c->where = gfc_current_locus; c->ts.type = BT_UNKNOWN; new_st.ext.case_list = c; + select_type_set_tmp (NULL); return MATCH_YES; } -- 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|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2010-08-26 19:55:39 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45420
next prev parent reply other threads:[~2010-08-26 19:55 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-08-26 17:43 [Bug fortran/45420] New: " janus at gcc dot gnu dot org 2010-08-26 17:55 ` [Bug fortran/45420] " janus at gcc dot gnu dot org 2010-08-26 19:55 ` janus at gcc dot gnu dot org [this message] 2010-08-26 20:08 ` [Bug fortran/45420] [OOP] polymorphic TBP call " janus at gcc dot gnu dot org 2010-08-27 7:37 ` sfilippone at uniroma2 dot it 2010-08-27 9:08 ` janus at gcc dot gnu dot org 2010-08-27 11:38 ` sfilippone at uniroma2 dot it 2010-08-27 14:40 ` sfilippone at uniroma2 dot it 2010-08-27 19:02 ` janus at gcc dot gnu dot org 2010-08-27 19:14 ` janus at gcc dot gnu dot org 2010-08-27 19:15 ` janus at gcc dot gnu dot 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=20100826195540.31314.qmail@sourceware.org \ --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: linkBe 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).