This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/46897] [OOP] Polymorphic type - defined ASSIGNMENT(=) not used
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 12 Dec 2010 22:15:41 +0000
- Subject: [Bug fortran/46897] [OOP] Polymorphic type - defined ASSIGNMENT(=) not used
- Auto-submitted: auto-generated
- References: <bug-46897-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46897
--- Comment #1 from janus at gcc dot gnu.org 2010-12-12 22:15:30 UTC ---
Here is a slightly reduced test case:
module m
implicit none
type component
contains
procedure :: assign
generic :: assignment(=)=>assign
end type
type t
type(component) :: foo
end type
contains
subroutine assign(lhs,rhs)
class(component), intent(out) :: lhs
class(component), intent(in) :: rhs
print *,'defined assignment called'
end subroutine
end module
program main
use m
implicit none
type(t) :: infant, newchild
infant = newchild
end