[Bug ada/83002] New: Missing finalization of generic package body
demoonlit at panathenaia dot halfmoon.jp
gcc-bugzilla@gcc.gnu.org
Wed Nov 15 11:41:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83002
Bug ID: 83002
Summary: Missing finalization of generic package body
Product: gcc
Version: 7.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: demoonlit at panathenaia dot halfmoon.jp
Target Milestone: ---
Created attachment 42613
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42613&action=edit
bug triggering source code
Hello.
The finalizer of package body (postfixed "__finalize_body") for controlled
object is not generated when it is generic package (and its spec does not need
finalizer ?).
See the attached file and run. I've expected for getting "OK" outputted by the
finalizer, but did not. And it works correctly if the controlled object
declaration is moved to its spec.
This bug also appeared with GNAT-GPL 2017.
--------
with x;
generic
package y is
pragma elaborate_body;
end y;
package body y is
object : x.t; -- this controlled object would not be finalized
end y;
More information about the Gcc-bugs
mailing list