AI22-0050-1

!standard 13.11.5(3/5)                                    23-04-21  AI22-0050-1/03

!class Binding Interpretation  22-10-25

!status Corrigendum 1-2022 22-11-10

!status WG9 Approved 23-06-13

!status ARG Approved 14-0-0  22-11-10

!status work item 22-10-25

!status received 22-07-19

!priority Low

!difficulty Easy

!qualifier Omission

!subject Ada.Unchecked_Deallocate_Subpool should be preelaborated

!summary

Procedure Ada.Unchecked_Deallocate_Subpool should have the Preelaborate aspect.

!issue

It would be useful if the Preelaborate aspect were set to True for procedure Ada.Unchecked_Deallocate_Subpool. The package System.Storage_Pools.Subpools has Preelaborate True, so there seems no reason that this procedure shouldn't as well.

!recommendation

(See Summary.)

!wording

Modify 13.11.5(3/5):

with System.Storage_Pools.Subpools;

procedure Ada.Unchecked_Deallocate_Subpool

   (Subpool : in out System.Storage_Pools.Subpools.Subpool_Handle)

   with {Preelaborate, }Global => in out all;

!discussion

Ada.Unchecked_Deallocation has the aspect Preelaborate, as does the needed package System.Storage_Pools.Subpools. Thus it seems to be an omission (rather than something intended) that Ada.Unchecked_Deallocate_Subpool does not have this aspect.

!corrigendum 13.11.5(3/5)

@drepl

@xcode{@b{with} System.Storage_Pools.Subpools;

@b{procedure} Ada.Unchecked_Deallocate_Subpool

   (Subpool : @b{in out} System.Storage_Pools.Subpools.Subpool_Handle)

   @b{with} Global => @b{in out all};}

@dby

@xcode{@b{with} System.Storage_Pools.Subpools;

@b{procedure} Ada.Unchecked_Deallocate_Subpool

   (Subpool : @b{in out} System.Storage_Pools.Subpools.Subpool_Handle)

   @b{with} {Preelaborate, @}Global => @b{in out all};}

!ACATS test

An ACATS C-Test could be constructed to check that the Ada.Unchecked_Deallocate_Subpool procedure is preelaborated.

!appendix

This AI comes from Github Issue #20 (https://github.com/Ada-Rapporteur-Group/User-Community-Input/issues/20).

******************************************************