[Bug fortran/49213] [OOP] gfortran rejects structure constructor expression

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 7 09:39:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49213

--- Comment #29 from janus at gcc dot gnu.org ---
Another very related test case:


program p

   type tContainer
      class(*), allocatable :: x
   end type

   integer, parameter :: i = 0

   type(tContainer) :: cont

   ! compiler error: Can't convert INTEGER(4) to CLASS(*)
   cont = tContainer(i)

   ! linker error: undefined reference to `__copy_INTEGER_4_.3804'
   cont%x = i

end


More information about the Gcc-bugs mailing list