This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/42545] TBP: Wrongly reject inherite TBP with types with private components



------- Comment #1 from janus at gcc dot gnu dot org  2010-01-17 22:35 -------
This problem is not specific to TBPs. It also appears for data components of
the parent type, as the following example shows:

module mo
  implicit none
  type :: tt
    integer :: i = 1
  end type
  type, extends(tt) :: ttt
    private ! <<<<<<<
    real :: x = 2.0
  end type
end module
program pr
  use mo
  implicit none
  type(ttt) :: obj
  print *,obj%tt%i
end program


This is incorrectly rejected with:

  print *,obj%tt%i
                1
Error: All components of 'ttt' are PRIVATE in structure constructor at (1)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42545


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]