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 <kirtc...@adacore.com> * exp_ch4.adb (Expand_N_Allocator): Generate a call to Allocate_Any_Controlled when the allocation does not require any initialization.
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