This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51972] [OOP] ALLOCATE misses memset/calloc, causing segfault
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 28 Jan 2012 17:40:23 +0000
- Subject: [Bug fortran/51972] [OOP] ALLOCATE misses memset/calloc, causing segfault
- Auto-submitted: auto-generated
- References: <bug-51972-4@http.gcc.gnu.org/bugzilla/>
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