This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/48810] New: [4.6/4.7 Regression] [OOP] TPB rejected because module is private
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 28 Apr 2011 18:49:34 +0000
- Subject: [Bug fortran/48810] New: [4.6/4.7 Regression] [OOP] TPB rejected because module is private
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48810
Summary: [4.6/4.7 Regression] [OOP] TPB rejected because module
is private
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
CC: janus@gcc.gnu.org
Reported by Andrew Baldwin at c.l.f, cf.
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/6e47d1d7271e4c02
The following program is accepted by NAG f95, by gfortran 4.5, and by Richard
Maine, but gfortran 4.6/4.7 reject it with:
bar = foo%getx()
1
Error: 'gimmex' of 'foobar' is PRIVATE at (1)
module qtest
type foobar
integer :: x
contains
private
procedure :: gimmex
generic, public :: getx => gimmex
end type foobar
contains
function gimmex(foo)
class (foobar) :: foo
integer :: gimmex
gimmex = foo%x
end function gimmex
end module qtest
program quicktest
use qtest
type (foobar) :: foo
integer :: bar
bar = foo%getx()
end program quicktest