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: Re: [Patch, Fortran, OOP] PR 49417: [4.6/4.7 Regression] ICE on invalid CLASS component declaration
Date: Thu, 16 Jun 2011 06:54:00 -0000	[thread overview]
Message-ID: <BANLkTin_ZMChAgB6ZMXszuB1M8VtTjEuOw@mail.gmail.com> (raw)
In-Reply-To: <BANLkTinHPcq1x2um+eMEaGQj4aGe25BqUg@mail.gmail.com>

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

Sorry, clearly the test case was missing a dg-error directive. Here's
the corrected version.

Cheers,
Janus




2011/6/15 Janus Weil <janus@gcc.gnu.org>:
> Hi all,
>
> here is the fix for an OOP-regression reported today by Andrew Benson
> (http://gcc.gnu.org/ml/fortran/2011-06/msg00119.html).
>
> It is fixed by checking the 'class_ok' attribute, which determines
> whether the CLASS declaration was ok. We also need to set this
> attribute for components read from module files, since the attribute
> itself is not written to the file.
>
> The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk?
>
> Cheers,
> Janus
>
>
> 2011-06-15  Janus Weil  <janus@gcc.gnu.org>
>
>        PR fortran/49417
>        * module.c (mio_component): Make sure the 'class_ok' attribute is set
>        for use-associated CLASS components.
>        * parse.c (parse_derived): Check for 'class_ok' attribute.
>        * resolve.c (resolve_fl_derived): Ditto.
>
> 2011-06-15  Janus Weil  <janus@gcc.gnu.org>
>
>        PR fortran/49417
>        * gfortran.dg/class_43.f03: New.
>

[-- Attachment #2: class_43.f03 --]
[-- Type: application/octet-stream, Size: 361 bytes --]

! { dg-do compile }
!
! PR 49417: [4.6/4.7 Regression] [OOP] ICE on invalid CLASS component declaration
!
! Contributed by Andrew Benson <abenson@its.caltech.edu>

 type :: nodeWrapper
 end type nodeWrapper

 type, extends(nodeWrapper) :: treeNode
    class(nodeWrapper) :: subComponent   ! { dg-error "must be allocatable or pointer" }
 end type treeNode

end

  reply	other threads:[~2011-06-16  6:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16  7:17 Janus Weil
2011-06-16  6:54 ` Janus Weil [this message]
2011-06-16  7:24 Tobias Burnus
2011-06-16  9:56 ` Janus Weil
2011-06-16 11:57   ` 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=BANLkTin_ZMChAgB6ZMXszuB1M8VtTjEuOw@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).