[Ada] AI12-0356 Root_Storage_Pool_With_Subpools & Preelaborable_Init

Message ID 20200611100009.GA90641@adacore.com
State New
Headers show
Series
  • [Ada] AI12-0356 Root_Storage_Pool_With_Subpools & Preelaborable_Init
Related show

Commit Message

Pierre-Marie de Rodat June 11, 2020, 10 a.m.
This Ada 202x AI clarifies that Root_Storage_Pool_With_Subpools and
Root_Subpool should have pragma Preelaborable_Initialization.

Tested on x86_64-pc-linux-gnu, committed on trunk

2020-06-11  Arnaud Charlet  <charlet@adacore.com>

gcc/ada/

	* libgnat/s-stposu.ads (Root_Storage_Pool_With_Subpools,
	Root_Subpool): Mark with Preelaborable_Initialization.

Patch

--- gcc/ada/libgnat/s-stposu.ads
+++ gcc/ada/libgnat/s-stposu.ads
@@ -42,12 +42,14 @@  package System.Storage_Pools.Subpools is
 
    type Root_Storage_Pool_With_Subpools is abstract
      new Root_Storage_Pool with private;
+   pragma Preelaborable_Initialization (Root_Storage_Pool_With_Subpools);
    --  The base for all implementations of Storage_Pool_With_Subpools. This
    --  type is Limited_Controlled by derivation. To use subpools, an access
    --  type must be associated with an implementation descending from type
    --  Root_Storage_Pool_With_Subpools.
 
    type Root_Subpool is abstract tagged limited private;
+   pragma Preelaborable_Initialization (Root_Subpool);
    --  The base for all implementations of Subpool. Objects of this type are
    --  managed by the pool_with_subpools.