This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/46897] defined ASSIGNMENT(=) not used for derived type component
- 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:26:02 +0000
- Subject: [Bug fortran/46897] defined ASSIGNMENT(=) not used for derived type component
- Auto-submitted: auto-generated
- References: <bug-46897-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46897
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[OOP] Polymorphic type - |defined ASSIGNMENT(=) not
|defined ASSIGNMENT(=) not |used for derived type
|used |component
--- Comment #2 from janus at gcc dot gnu.org 2010-12-12 22:25:52 UTC ---
I think one can run into the same problem already without polymorphism:
module m
implicit none
type component
end type
interface assignment(=)
module procedure assign
end interface
type t
type(component) :: foo
end type
contains
subroutine assign(lhs,rhs)
type(component), intent(out) :: lhs
type(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