This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/48887] [4.7 Regression][OOP] SELECT TYPE: Associate name shall not be a pointer/allocatable
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 02 Dec 2011 16:21:50 +0000
- Subject: [Bug fortran/48887] [4.7 Regression][OOP] SELECT TYPE: Associate name shall not be a pointer/allocatable
- Auto-submitted: auto-generated
- References: <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