-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorflang:ir
Description
See Fortran 2018 standard: "9.7.3.2 Deallocation of allocatable variables" point 2:
When the execution of a procedure is terminated by execution of a RETURN or END statement, an unsaved
allocatable local variable of the procedure retains its allocation and definition status if it is a function result or a
subobject thereof; otherwise, if it is allocated it will be deallocated.
This is currently not implemented and does not have a TODO. This causes:
- memory leaks in program relying on this feature.
- lack of type finalization for allocatable that require it.
This should be implemented in ConvertVariable.cpp here:
} |
if needEndFinalization
), except deallocation must be added to the function context cleanups.Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorflang:ir
Type
Projects
Status
Done