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/63553] [OOP] Wrong code when assigning a CLASS to a TYPE


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

--- Comment #5 from patnel97269-gfortran at yahoo dot fr ---
Thanks for the patch. 

Another similar case, this time the type contains an allocatable field,
produces a internal compiler error (without applying the patch) :

 internal compiler error: in fold_convert_loc, at fold-const.c:2112


program toto
implicit none

type mother
integer :: i
double precision,dimension(:),allocatable :: values
end type mother


class(mother),allocatable :: cm,cm2

allocate(cm)
allocate(cm%values(10))
cm%i=3
cm%values=80d0
allocate(cm2)
select type(cm2)
type is (mother)
cm2=cm
end select
print *,cm2%i,cm2%values
end program


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