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/67933] [4.9/5/6 Regression] ICE for array of a derived type with allocatable class in derived type object


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


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