This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/46897] defined ASSIGNMENT(=) not used for derived type component


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]