http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41936
--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- > Calling gfc_deallocate_alloc_comp for BT_CLASS looks wrong. ... I have only added " && expr->rank" to the three year old Mikael's patch. > You have to call the finalization wrapper - to ensure that not only the > allocatable components of the declared type but also the ones of the > effective/actual type are deallocated. Additionally, that ensure that > user's finalizer is called when it exists. > > (For BT_DERIVED, you may also have to call the finalization wrapper - but only > if the type has finalizers.) Could you please provide a more explicit pointer?