This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/42545] type extension: parent component has wrong accessibility
- 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:42:23 -0000
- Subject: [Bug fortran/42545] type extension: parent component has wrong accessibility
- References: <bug-42545-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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