This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/63553] [OOP] Wrong code when assigning a CLASS to a TYPE
- From: "patnel97269-gfortran at yahoo dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 20 Oct 2014 16:11:05 +0000
- Subject: [Bug fortran/63553] [OOP] Wrong code when assigning a CLASS to a TYPE
- Auto-submitted: auto-generated
- References: <bug-63553-4 at http dot gcc dot gnu dot org/bugzilla/>
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