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: unassig...@gcc.gnu.org ReportedBy: bur...@gcc.gnu.org CC: ja...@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