aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch6.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-10-15 11:22:01 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-10-15 11:22:01 +0200
commit3e452820c3956cbefe3a0547fe51198a882d9e54 (patch)
tree96772105a94b5dd2509256c64d5d12042e63189d /gcc/ada/exp_ch6.adb
parent4650947d66b44b48786a73ac2972ef96f0613565 (diff)
downloadgcc-3e452820c3956cbefe3a0547fe51198a882d9e54.zip
gcc-3e452820c3956cbefe3a0547fe51198a882d9e54.tar.gz
gcc-3e452820c3956cbefe3a0547fe51198a882d9e54.tar.bz2
[multiple changes]
2011-10-15 Bob Duff <duff@adacore.com> * exp_ch6.adb (Add_Unconstrained_Actuals_To_Build_In_Place_Call): Do not create a pool formal on unless RE_Root_Storage_Pool_Ptr is available. (Expand_N_Extended_Return_Statement): Do not create a renaming of the build-in-place pool parameter unless RE_Root_Storage_Pool_Ptr is available. (Make_Build_In_Place_Call_In_Allocator): Add the user-defined pool only if RE_Root_Storage_Pool_Ptr is available. (Make_Build_In_Place_Call_In_Object_Declaration): Do not add a pool actual unless RE_Root_Storage_Pool_Ptr is available. * sem_ch6.adb (Create_Extra_Formals): Add build-in-place pool formal only if RE_Root_Storage_Pool_Ptr is available. 2011-10-15 Matthew Heaney <heaney@adacore.com> * a-cusyqu.ads, a-cbsyqu.ads, a-cuprqu.ads, a-cbprqu.ads (Queue type): Specify Priority aspect for protected type. From-SVN: r180025
Diffstat (limited to 'gcc/ada/exp_ch6.adb')
-rw-r--r--gcc/ada/exp_ch6.adb20
1 files changed, 13 insertions, 7 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index 035c433..17b72cf 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -311,10 +311,12 @@ package body Exp_Ch6 is
Add_Extra_Actual_To_Call
(Function_Call, Alloc_Form_Formal, Alloc_Form_Actual);
- -- Pass the Storage_Pool parameter. This parameter is omitted on .NET
- -- and JVM as those targets do not support pools.
+ -- Pass the Storage_Pool parameter. This parameter is omitted
+ -- .NET/JVM/ZFP as those targets do not support pools.
- if VM_Target = No_VM then
+ if
+ VM_Target = No_VM and then RTE_Available (RE_Root_Storage_Pool_Ptr)
+ then
Pool_Formal := Build_In_Place_Formal (Function_Id, BIP_Storage_Pool);
Analyze_And_Resolve (Pool_Actual, Etype (Pool_Formal));
Add_Extra_Actual_To_Call
@@ -5241,10 +5243,12 @@ package body Exp_Ch6 is
Pool_Allocator := New_Copy_Tree (Heap_Allocator);
-- Do not generate the renaming of the build-in-place
- -- pool parameter on .NET/JVM because the parameter is
- -- not created in the first place.
+ -- pool parameter on .NET/JVM/ZFP because the parameter
+ -- is not created in the first place.
- if VM_Target = No_VM then
+ if VM_Target = No_VM and then
+ RTE_Available (RE_Root_Storage_Pool_Ptr)
+ then
Pool_Decl :=
Make_Object_Renaming_Declaration (Loc,
Defining_Identifier => Pool_Id,
@@ -8137,7 +8141,9 @@ package body Exp_Ch6 is
-- has an unconstrained or tagged result type).
if Needs_BIP_Alloc_Form (Enclosing_Func) then
- if VM_Target = No_VM then
+ if VM_Target = No_VM and then
+ RTE_Available (RE_Root_Storage_Pool_Ptr)
+ then
Pool_Actual :=
New_Reference_To (Build_In_Place_Formal
(Enclosing_Func, BIP_Storage_Pool), Loc);