This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/67933] [4.9/5/6 Regression] ICE for array of a derived type with allocatable class in derived type object
- From: "mikael at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 18 Oct 2015 21:30:32 +0000
- Subject: [Bug fortran/67933] [4.9/5/6 Regression] ICE for array of a derived type with allocatable class in derived type object
- Auto-submitted: auto-generated
- References: <bug-67933-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67933
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikael at gcc dot gnu.org
Blocks|37336 |
--- Comment #2 from Mikael Morin <mikael at gcc dot gnu.org> ---
The generated finalization wrapper has code doing
deallocate(ptr2%classes(:)%class_var)
where ptr2 is a pointer of type list_t to be finalized.
This is missing scalarization, a correct code would do instead:
do i=1,size(ptr2)
ptr3 => ptr2%classes(i)
deallocate (ptr3%class_var)
end do
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
[Bug 37336] [F03] Finish derived-type finalization