This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/24534] New: gfortran: regression w/ PUBLIC derived types with private components
- From: "anlauf at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Oct 2005 08:07:20 -0000
- Subject: [Bug fortran/24534] New: gfortran: regression w/ PUBLIC derived types with private components
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Hi,
the following valid code snippet recently stopped to compile cleanly:
module gfcbug28
! A publicly visible derived type with private components
type, public :: my_t
private
type(offset_t) :: offset
end type my_t
! Everything else is private...
private
type offset_t
integer :: i
end type offset_t
end module gfcbug28
I get:
In file gfcbug28.f90:4
type, public :: my_t
1
Error: The component 'offset' is a PRIVATE type and cannot be a component of
'my_t', which is PUBLIC at (1)
This is clearly nonsense. Although the type "my_t" is PUBLIC,
its components are not.
Cheers,
-ha
--
Summary: gfortran: regression w/ PUBLIC derived types with
private components
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: anlauf at gmx dot de
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24534