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/46990] [OOP] gfortran rejects passing a CLASS variable to TYPE


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

--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-02-01 09:26:52 UTC ---
A variant is
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/dad37643dd8cd0c6

where the defined assignment has:
  elemental subroutine assign (a, b)
    class(base_type), intent(out) :: a
    type(base_type), intent(in) :: b

which is not recognized by gfortran and thus the:
    class(base_type), dimension(:), allocatable, intent(inout) :: a
    class(base_type), dimension(:), allocatable :: tmp 
    tmp(:size(a)) = a             ! polymorphic l.h.s. 

is rejected.


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