From
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/ed70666b0c90b655#
the following code:
module m
implicit none
private
type :: t1
integer :: i
end type
type :: t2
type(t1) :: j
end type
contains
subroutine sub()
implicit none
type :: t3
type(t1) :: j
end type
end subroutine
end module
gives the following error when compiled with gfortran (all versions I have):
private_2.f90:13.17:
type :: t3
1
Error: The component 'j' is a PRIVATE type and cannot be a component of 't3',
which is PUBLIC at (1)
According the thread, it looks like a gfortran bug.
--
Summary: PRIVATE type cannot be a component
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dominiq at lps dot ens dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39805