public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/46897] New: [OOP] Polymorphic type - defined ASSIGNMENT(=) not used
@ 2010-12-11 22:20 burnus at gcc dot gnu.org
  2010-12-12 22:15 ` [Bug fortran/46897] " janus at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-12-11 22:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46897

           Summary: [OOP] Polymorphic type - defined ASSIGNMENT(=) not
                    used
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
                CC: janus@gcc.gnu.org


Reported by Damian at http://gcc.gnu.org/ml/fortran/2010-12/msg00063.html

The following program should print "defined assignment called". It does so with
the IBM compiler but not with gfortran.

module component_parent_child_module
  implicit none
  type component
  contains
    procedure :: assign
    generic :: assignment(=)=>assign
  end type
  type parent
    type(component) :: foo
  end type
  type, extends(parent) :: child
  end type
contains
  subroutine assign(lhs,rhs)
    class(component), intent(out) :: lhs
    class(component), intent(in) :: rhs
    print *,'defined assignment called'
  end subroutine 
  type(child) function new_child()
  end function
end module 

program main
  use component_parent_child_module
  implicit none
  type(child) :: infant
  infant = new_child()
end


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-05-25 13:08 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-11 22:20 [Bug fortran/46897] New: [OOP] Polymorphic type - defined ASSIGNMENT(=) not used burnus at gcc dot gnu.org
2010-12-12 22:15 ` [Bug fortran/46897] " janus at gcc dot gnu.org
2010-12-12 22:26 ` [Bug fortran/46897] defined ASSIGNMENT(=) not used for derived type component janus at gcc dot gnu.org
2010-12-13  7:37 ` burnus at gcc dot gnu.org
2010-12-13  9:08 ` janus at gcc dot gnu.org
2010-12-13  9:28 ` [Bug fortran/46897] [OOP] type-bound defined ASSIGNMENT(=) not used for derived type component in intrinsic assign janus at gcc dot gnu.org
2010-12-13 15:17 ` damian at rouson dot net
2010-12-13 16:37 ` burnus at gcc dot gnu.org
2012-08-11 13:18 ` pault at gcc dot gnu.org
2012-12-01  8:01 ` pault at gcc dot gnu.org
2012-12-03 10:02 ` burnus at gcc dot gnu.org
2013-05-22  9:19 ` burnus at gcc dot gnu.org
2013-05-22  9:22 ` burnus at gcc dot gnu.org
2013-09-15 14:19 ` burnus at gcc dot gnu.org
2021-02-03 21:22 ` gronki at gmail dot com
2022-05-25 13:08 ` trnka at scm dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).