public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/48887] [4.7 Regression][OOP] SELECT TYPE:  Associate name shall not be a pointer/allocatable
Date: Fri, 02 Dec 2011 16:22:00 -0000	[thread overview]
Message-ID: <bug-48887-4-0eMI4rKPjo@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-48887-4@http.gcc.gnu.org/bugzilla/>

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.7.0
            Summary|[OOP] SELECT TYPE:          |[4.7 Regression][OOP]
                   |Associate name shall not be |SELECT TYPE:  Associate
                   |a pointer/allocatable       |name shall not be a
                   |                            |pointer/allocatable

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-12-02 16:21:50 UTC ---
At least for the following test case there is a regression. While the "must be
ALLOCATABLE" is printed correctly three times with GCC 4.6, with GCC 4.7 I only
get the error for ASSOCIATE (as expected, cf. comment 2) and not for SELECT
TYPE.

type t
end type t
class(t), allocatable :: x

! Expected: An error, but none is printed:
select type(x)
  type is(t)
    print *, allocated (x) ! { dg-error "must be ALLOCATABLE" }
end select

! Expected: An error, but none is printed:
select type(y=>x)
  type is(t)
    print *, allocated (y)  ! { dg-error "must be ALLOCATABLE" }
end select

! Here, the error is printed:
associate (y=>x)
  print *, allocated (y)  ! { dg-error "must be ALLOCATABLE" }
end associate
end


  parent reply	other threads:[~2011-12-02 16:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-05 13:11 [Bug fortran/48887] New: [OOP] " burnus at gcc dot gnu.org
2011-05-06 17:28 ` [Bug fortran/48887] " domob at gcc dot gnu.org
2011-05-27 11:04 ` domob at gcc dot gnu.org
2011-06-16 14:33 ` janus at gcc dot gnu.org
2011-12-02 16:22 ` burnus at gcc dot gnu.org [this message]
2011-12-03 18:32 ` [Bug fortran/48887] [4.7 Regression][OOP] " burnus at gcc dot gnu.org
2011-12-03 18:35 ` burnus 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-48887-4-0eMI4rKPjo@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).