This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/54035] New: [OOP] TBP wrongly binds to a generic name if the specific name is the same
- 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, 19 Jul 2012 18:24:10 +0000
- Subject: [Bug fortran/54035] New: [OOP] TBP wrongly binds to a generic name if the specific name is the same
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54035
Bug #: 54035
Summary: [OOP] TBP wrongly binds to a generic name if the
specific name is the same
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
CC: janus@gcc.gnu.org
Reported by Erik Toussaint in comp.lang.fortran,
http://www.rhinocerus.net/forum/lang-fortran/710071-tbp-generic.html
The problem occurs if a generic name is a specific name â and the specific name
is used in a type-bound procedure.
As the example shows, the type-bound procedure becomes also generic â and thus
"call type%proc"
is all of a sudden generic.
module foo
implicit none
type t1
contains
procedure, nopass :: sub
end type
interface sub
procedure sub
procedure sub2
end interface
contains
subroutine sub
print *, 'sub1'
end subroutine
subroutine sub2(arg1)
integer arg1
print *, 'sub2'
end subroutine
end module
program bar
use foo
implicit none
type(t1) obj
call obj%sub
call obj%sub(0)
end program