> Dear All,
> Is this a bug in Gfortran or rather illegal code, see below.
> Reproducible both with 4.3.2 and 4.4 snapshot
> GNU Fortran (Ubuntu 20081024-0ubuntu1) 4.4.0 20081024 (experimental)
> [trunk revision 141342]
> Alexei
> alexei@lx01:~/darcs/ttfs-mac$ gfortran m.f90
> m.f90:18.16:
> type :: t3
> 1
> Error: The component 'j' is a PRIVATE type and cannot be a component
> of 't3', which is PUBLIC at (1)
> alexei@lx01:~/darcs/ttfs-mac$ cat m.f90
> 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
Seems to be a bug in gfortran ...