aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch7.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-04 14:14:06 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-04 14:14:06 +0200
commit6367dd30236275f012c58eff2f3098f4b55a50a9 (patch)
tree10ec105d84ccb141fe1d95def01ab424d615b6a5 /gcc/ada/exp_ch7.adb
parentcd8bfe35548ebe03b6c628d2ae6fdd5ab960ed74 (diff)
downloadgcc-6367dd30236275f012c58eff2f3098f4b55a50a9.zip
gcc-6367dd30236275f012c58eff2f3098f4b55a50a9.tar.gz
gcc-6367dd30236275f012c58eff2f3098f4b55a50a9.tar.bz2
[multiple changes]
2011-08-04 Emmanuel Briot <briot@adacore.com> * make.adb, makeutl.adb, makeutl.ads (Make): major refactoring. Create several new subprograms to move code out of Make. This makes the code more readable, removes code duplication, and is a preparation work for adding support for aggregate projects. 2011-08-04 Tristan Gingold <gingold@adacore.com> * s-po32gl.ads, s-po32gl.adb: New files. * exp_ch7.ads (Get_Global_Pool_For_Access_Type): New function. * exp_ch7.adb (Get_Global_Pool_For_Access_Type): New function. (Build_Finalization_Collection): Use it. * exp_ch4.adb (Complete_Controlled_Allocation): Ditto. * rtsfind.ads: System_Pool_32_Global, Re_Global_Pool_32_Object: New literals. * gcc-interface/Makefile.in: Use s-po32gl.o on VMS. * gcc-interface/Make-lang.in: Update dependencies. From-SVN: r177364
Diffstat (limited to 'gcc/ada/exp_ch7.adb')
-rw-r--r--gcc/ada/exp_ch7.adb19
1 files changed, 17 insertions, 2 deletions
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb
index 3891b03..5ecf752 100644
--- a/gcc/ada/exp_ch7.adb
+++ b/gcc/ada/exp_ch7.adb
@@ -949,7 +949,7 @@ package body Exp_Ch7 is
begin
if No (Associated_Storage_Pool (Base_Typ)) then
- Pool_Id := RTE (RE_Global_Pool_Object);
+ Pool_Id := Get_Global_Pool_For_Access_Type (Base_Typ);
Set_Associated_Storage_Pool (Base_Typ, Pool_Id);
else
Pool_Id := Associated_Storage_Pool (Base_Typ);
@@ -959,7 +959,7 @@ package body Exp_Ch7 is
-- The default choice is the global pool
else
- Pool_Id := RTE (RE_Global_Pool_Object);
+ Pool_Id := Get_Global_Pool_For_Access_Type (Typ);
Set_Associated_Storage_Pool (Typ, Pool_Id);
end if;
@@ -4072,6 +4072,21 @@ package body Exp_Ch7 is
end loop;
end Find_Node_To_Be_Wrapped;
+ -------------------------------------
+ -- Get_Global_Pool_For_Access_Type --
+ -------------------------------------
+
+ function Get_Global_Pool_For_Access_Type (T : Entity_Id) return Entity_Id is
+ begin
+ if Opt.True_VMS_Target
+ and then Esize (T) = 32
+ then
+ return RTE (RE_Global_Pool_32_Object);
+ else
+ return RTE (RE_Global_Pool_Object);
+ end if;
+ end Get_Global_Pool_For_Access_Type;
+
----------------------------------
-- Has_New_Controlled_Component --
----------------------------------