[Bug fortran/51972] [OOP] ALLOCATE misses memset/calloc, causing segfault
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jan 28 19:01:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51972
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-01-28 17:40:23 UTC ---
Simplified test case: The problem is that there is a "CLASS" contained in the
derived type. This is currently not handled at all, but one needs: (a) an
allocation and (b) another _vtab->_copy call.
type t
integer :: x
end type t
type t2
class(t), allocatable :: a
end type t2
type(t2) :: one, two
allocate (two%a)
two%a%x = 7890
one = two
if (one%a%x /= 7890) call abort ()
end
More information about the Gcc-bugs
mailing list