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/49213] [OOP] gfortran rejects structure constructor expression


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

--- Comment #12 from janus at gcc dot gnu.org ---
Related test case (using unlimited polymorphism) from
http://gcc.gnu.org/ml/fortran/2013-08/msg00011.html:

type t
  class(*), pointer :: x
end type t
type(t), target :: y
integer,target :: z
type(t) :: x = t(y)
type(t) :: x = t(z)
class(*), pointer :: a => y 
end


Unpatched gfortran trunk yields:

tobias2.f90:7.17:

type(t) :: x = t(y)
                 1
Error: Can't convert TYPE(t) to CLASS(*) at (1)
tobias2.f90:8.17:

type(t) :: x = t(z)
                 1
Error: Can't convert INTEGER(4) to CLASS(*) at (1)


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