This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33106] Access of components of public entities of private types wrongly allowed
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Aug 2007 06:21:41 -0000
- Subject: [Bug fortran/33106] Access of components of public entities of private types wrongly allowed
- References: <bug-33106-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from burnus at gcc dot gnu dot org 2007-08-20 06:21 -------
Richard Maine claims that also
print *, code_gree
is valid. Thus there needs to be only a Fortran 95 check in module.
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/6f683312292e2865/
Note: The following is an example which is valid Fortran 2003, invalid F95 and
rejected by gfortran ("'a' is of a PRIVATE type and cannot be a dummy argument
of 'sub'"):
module a
implicit none
type, private :: t
integer :: i
end type t
type(t), parameter :: one = t(1)
type(t), parameter :: two = t(2)
contains
subroutine sub(a)
type(t) :: a
end subroutine sub
end module a
use a, only: sub
end
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33106