diff mbox series

[Ada] Failure to allocate on storage subpool

Message ID 20170908091619.GA103308@adacore.com
State New
Headers show
Series [Ada] Failure to allocate on storage subpool | expand

Commit Message

Arnaud Charlet Sept. 8, 2017, 9:16 a.m. UTC
This patch modifies the processing of allocators to account for a case where
a simple allocation still requires a call to Allocate_Any_Controlled due to
subpool management. No small reproducer possible.

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

2017-09-08  Hristian Kirtchev  <kirtchev@adacore.com>

	* exp_ch4.adb (Expand_N_Allocator): Generate a
	call to Allocate_Any_Controlled when the allocation does not
	require any initialization.
diff mbox series

Patch

Index: exp_ch4.adb
===================================================================
--- exp_ch4.adb	(revision 251863)
+++ exp_ch4.adb	(working copy)
@@ -4632,7 +4632,9 @@ 
             --  No initialization required
 
             else
-               null;
+               Build_Allocate_Deallocate_Proc
+                 (N           => N,
+                  Is_Allocate => True);
             end if;
 
          --  Case of initialization procedure present, must be called