summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch4.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-03 14:49:52 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-03 14:49:52 +0000
commita08d6ad4d019ef0752e2949c687f4c587c43fd21 (patch)
tree59d55631d2c1913cb618b2b073968fcf83a2a2fc /gcc/ada/exp_ch4.adb
parentedf906a8e0ad8173b90e41f047f407c7587c4a28 (diff)
downloadgcc-a08d6ad4d019ef0752e2949c687f4c587c43fd21.tar.gz
2011-08-03 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch13.adb: Add with and use clauses for Restrict and Rident. (Expand_N_Free_Statement): Add a guard to protect against run-times which do not support controlled types. * exp_ch3.adb (Expand_Freeze_Class_Wide_Type): Add a guard to protect against run-times which do not support controlled types. * exp_ch4.adb (Complete_Controlled_Allocation): Add a guard to protect against run-times which do not support controlled types. * exp_ch7.adb (Build_Finalization_Collection): Add a guard to protect against run-times which do not support controlled types. * exp_util.adb (Needs_Finalization): Code reformatting. Add a guard to protect against run-times which do not support controlled types. 2011-08-03 Eric Botcazou <ebotcazou@adacore.com> * exp_intr.adb: Put back with and use clauses for Exp_Ch11. (Expand_Unc_Deallocation): Expand the AT_END handler at the very end. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177280 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch4.adb')
-rw-r--r--gcc/ada/exp_ch4.adb8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index fb7f3b04e9c..58516cdf36b 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -427,9 +427,15 @@ package body Exp_Ch4 is
-- Start of processing for Complete_Controlled_Allocation
begin
+ -- Certain run-time configurations and targets do not provide support
+ -- for controlled types.
+
+ if Restriction_Active (No_Finalization) then
+ return;
+
-- Do nothing if the access type may never allocate an object
- if No_Pool_Assigned (Ptr_Typ) then
+ elsif No_Pool_Assigned (Ptr_Typ) then
return;
-- Access-to-controlled types are not supported on .NET/JVM