------- Comment #2 from janus at gcc dot gnu dot org 2010-01-17 22:42 ------- Another related example. This one is being accepted, although it is invalid.
module mo implicit none type,private :: tt integer :: i = 1 end type type, extends(tt) :: ttt real :: x = 2.0 end type end module program pr use mo implicit none type(ttt) :: obj print *,obj%tt%i end program The problem clearly is the accessibility of the parent component. -- janus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|TBP: Wrongly reject inherite|type extension: parent |TBP with types with private |component has wrong |components |accessibility http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42545