This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/42545] TBP: Wrongly reject inherite TBP with types with private components
- From: "janus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jan 2010 22:35:25 -0000
- Subject: [Bug fortran/42545] TBP: Wrongly reject inherite TBP with types with private components
- References: <bug-42545-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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