http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49213
janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[OOP][F2008] gfortran |[OOP] gfortran rejects |rejects structure |structure constructor |constructor expression |expression --- Comment #2 from janus at gcc dot gnu.org 2011-06-16 19:49:33 UTC --- (In reply to comment #1) > Note: Intrinsic assignments to polymorphic variables are forbidden in the > Fortran 2003 standard, and currently not supported by gfortran, cf. PR 43366. However, the same error message appears for the following variant (with a defined assignment), which is valid according to F03: module m type :: S integer :: n contains generic :: assignment (=) => assgn procedure :: assgn end type type :: T class(S), allocatable :: x end type contains subroutine assgn (a, b) class (S), intent (inout) :: a class (S), intent (in) :: b end subroutine end module use m type(S) :: Sobj type(T) :: Tobj Sobj = S(1) Tobj = T(Sobj) end program Tobj = T(Sobj) 1 Error: Can't convert TYPE(s) to CLASS(s) at (1)