aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorHristian Kirtchev <kirtchev@adacore.com>2011-08-04 08:28:33 +0000
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-04 10:28:33 +0200
commitf65df6093be0c1a6a519122683ed0b305850203a (patch)
tree6fec0bb0534a1d167b275095381e78a601f19bdc /gcc
parenta0fb8fe8d90fee970854a3e9b72d0c5ba9f4149a (diff)
downloadgcc-f65df6093be0c1a6a519122683ed0b305850203a.zip
gcc-f65df6093be0c1a6a519122683ed0b305850203a.tar.gz
gcc-f65df6093be0c1a6a519122683ed0b305850203a.tar.bz2
exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of Set_Finalize_Address_Ptr for CodePeer because...
2011-08-04 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not built in the first place. (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not built to begin with. * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto. From-SVN: r177330
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog9
-rw-r--r--gcc/ada/exp_ch4.adb9
-rw-r--r--gcc/ada/exp_ch6.adb5
3 files changed, 20 insertions, 3 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index c4dd6f1..e922351 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,12 @@
+2011-08-04 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * exp_ch4.adb (Expand_Allocator_Expression): Disable the generation of
+ Set_Finalize_Address_Ptr for CodePeer because Finalize_Address was not
+ built in the first place.
+ (Expand_N_Allocator): Disable the generation of Set_Finalize_Address_Ptr
+ for CodePeer because Finalize_Address was not built to begin with.
+ * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Ditto.
+
2011-08-04 Pascal Obry <obry@adacore.com>
* adaint.c (__gnat_tmp_name): Use current process id to create temp
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index e340fee..7f9fdb2 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -1076,9 +1076,11 @@ package body Exp_Ch4 is
-- (Collection, <Finalize_Address>'Unrestricted_Access)
-- Since .NET/JVM compilers do not support address arithmetic,
- -- this call is skipped.
+ -- this call is skipped. The same is done for CodePeer because
+ -- Finalize_Address is never generated.
if VM_Target = No_VM
+ and then not CodePeer_Mode
and then Present (Associated_Collection (PtrT))
then
Insert_Action (N,
@@ -3847,7 +3849,10 @@ package body Exp_Ch4 is
-- Set_Finalize_Address_Ptr
-- (Pool, <Finalize_Address>'Unrestricted_Access)
- else
+ -- Do not generate the above for CodePeer compilations
+ -- because Finalize_Address is never built.
+
+ elsif not CodePeer_Mode then
Insert_Action (N,
Make_Set_Finalize_Address_Ptr_Call
(Loc => Loc,
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb
index eabd3ef..1d9544d 100644
--- a/gcc/ada/exp_ch6.adb
+++ b/gcc/ada/exp_ch6.adb
@@ -7187,7 +7187,10 @@ package body Exp_Ch6 is
then
null;
- else
+ -- Do not generate the call to Make_Set_Finalize_Address_Ptr for
+ -- CodePeer compilations becase Finalize_Address is never built.
+
+ elsif not CodePeer_Mode then
Insert_Action (Allocator,
Make_Set_Finalize_Address_Ptr_Call (Loc,
Typ => Etype (Function_Id),