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