aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch4.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-09-02 09:14:48 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-09-02 09:14:48 +0200
commitf7bb41af65aa53933814ec82474497876d396b33 (patch)
tree8c77a20466ed1782c4853f1bf84f75cd195f61f7 /gcc/ada/exp_ch4.adb
parentbd0bc43e58edb507c01ecabdfdf0e7717a825324 (diff)
downloadgcc-f7bb41af65aa53933814ec82474497876d396b33.zip
gcc-f7bb41af65aa53933814ec82474497876d396b33.tar.gz
gcc-f7bb41af65aa53933814ec82474497876d396b33.tar.bz2
[multiple changes]
2011-09-02 Bob Duff <duff@adacore.com> * einfo.adb: (Has_Xref_Entry): Do not call Implementation_Base_Type. Lib.Xref has been rewritten to avoid the need for it, and it was costly. * s-htable.ads,s-htable.adb: (Present,Set_If_Not_Present): New functions in support of efficient xref. * lib-xref-alfa.adb: Misc changes related to Key component of type Xref_Entry. * lib-xref.adb: (Add_Entry,etc): Speed improvement. (New_Entry): Call Implementation_Base_Type, because Has_Xref_Entry no longer does. This is the one place where it is needed. 2011-09-02 Johannes Kanig <kanig@adacore.com> * g-comlin.adb (Getopt): New optional argument Concatenate to have similar interface as the other Getopt function. 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch4.adb: (Expand_Allocator_Expression): Do not generate a call to Set_Finalize_Address if there is no allocator available. * exp_util.adb: (Build_Allocate_Deallocate_Proc): Account for a case of allocator expansion where the allocator is not expanded but needs a custom allocate routine. Code reformatting. (Is_Finalizable_Transient): Remove local variables Has_Rens and Ren_Obj. Code reformatting. (Is_Renamed): Renamed to Is_Aliased. Add code to detect aliasing through the use of 'reference. * sem_ch4.adb: (Analyze_Allocator): Detect allocators generated as part of build-in-place expansion. They are intentionally marked as coming from source, but their parents are not. From-SVN: r178436
Diffstat (limited to 'gcc/ada/exp_ch4.adb')
-rw-r--r--gcc/ada/exp_ch4.adb5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 65735b8..3c6754b 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -1137,11 +1137,14 @@ package body Exp_Ch4 is
-- Since .NET/JVM compilers do not support address arithmetic,
-- this call is skipped. The same is done for CodePeer because
- -- primitive Finalize_Address is never generated.
+ -- primitive Finalize_Address is never generated. Do not create
+ -- this call if there is no allocator available any more.
if VM_Target = No_VM
and then not CodePeer_Mode
and then Present (Finalization_Master (PtrT))
+ and then Present (Temp_Decl)
+ and then Nkind (Expression (Temp_Decl)) = N_Allocator
then
Insert_Action (N,
Make_Set_Finalize_Address_Call