Bug 64290 - [F03] No finalization at deallocation of LHS
Summary: [F03] No finalization at deallocation of LHS
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Keywords: wrong-code
Depends on:
Blocks: Finalization
  Show dependency treegraph
Reported: 2014-12-12 16:25 UTC by Bálint Aradi
Modified: 2018-08-20 15:55 UTC (History)
1 user (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed: 2014-12-15 00:00:00

Self contained source demonstrating (253 bytes, text/x-fortran)
2014-12-12 16:25 UTC, Bálint Aradi

Note You need to log in before you can comment on or make changes to this bug.
Description Bálint Aradi 2014-12-12 16:25:53 UTC
Created attachment 34268 [details]
Self contained source demonstrating

During an assingment with an allocatable type on both, the LHS and the RHS, the destructor of the LHS-type is not called. IMHO, this is erroneous behaviour as the LHS gets (hopfully) deallocated on the assignment.
Comment 1 janus 2014-12-15 11:46:48 UTC
Confirmed. See also PR 37336 comment 27.