public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Janus Weil <janus@gcc.gnu.org>
To: gfortran <fortran@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: [Patch, Fortran, OOP] PR 44616: ICE if CLASS(foo) is used before its 	definition
Date: Tue, 22 Jun 2010 09:02:00 -0000	[thread overview]
Message-ID: <AANLkTin5YrGAotlIfSjjbU6BOspOn7jub6ANoio7ZcV3@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 403 bytes --]

Hi all,

here is an obvious patch which I will commit later today together with
the original test case (regtesting was successful).

Cheers,
Janus



2010-06-22  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/44616
	* resolve.c (resolve_fl_derived): Avoid checking for abstract on class
	containers.

2010-06-22  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/44616
	* gfortran.dg/abstract_type_8.f03: New.

[-- Attachment #2: pr44616.diff --]
[-- Type: application/octet-stream, Size: 550 bytes --]

Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c	(revision 161045)
+++ gcc/fortran/resolve.c	(working copy)
@@ -11136,6 +11136,7 @@ resolve_fl_derived (gfc_symbol *sym)
   /* If this is a non-ABSTRACT type extending an ABSTRACT one, ensure that
      all DEFERRED bindings are overridden.  */
   if (super_type && super_type->attr.abstract && !sym->attr.abstract
+      && !sym->attr.is_class
       && ensure_not_abstract (sym, super_type) == FAILURE)
     return FAILURE;
 

             reply	other threads:[~2010-06-22  8:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-22  9:02 Janus Weil [this message]
2010-06-22 17:31 ` Janus Weil

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=AANLkTin5YrGAotlIfSjjbU6BOspOn7jub6ANoio7ZcV3@mail.gmail.com \
    --to=janus@gcc.gnu.org \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@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).