aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch13.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2011-08-03 16:49:52 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2011-08-03 16:49:52 +0200
commitf553e7bc12de8a7d47f51cc5ea0c3d2a22de487e (patch)
tree59d55631d2c1913cb618b2b073968fcf83a2a2fc /gcc/ada/exp_ch13.adb
parent78277376769b518b84f67ccc852af06d1842bad3 (diff)
downloadgcc-f553e7bc12de8a7d47f51cc5ea0c3d2a22de487e.zip
gcc-f553e7bc12de8a7d47f51cc5ea0c3d2a22de487e.tar.gz
gcc-f553e7bc12de8a7d47f51cc5ea0c3d2a22de487e.tar.bz2
[multiple changes]
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. From-SVN: r177280
Diffstat (limited to 'gcc/ada/exp_ch13.adb')
-rw-r--r--gcc/ada/exp_ch13.adb10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ada/exp_ch13.adb b/gcc/ada/exp_ch13.adb
index 0af6519..761a281 100644
--- a/gcc/ada/exp_ch13.adb
+++ b/gcc/ada/exp_ch13.adb
@@ -35,6 +35,8 @@ with Namet; use Namet;
with Nlists; use Nlists;
with Nmake; use Nmake;
with Opt; use Opt;
+with Restrict; use Restrict;
+with Rident; use Rident;
with Rtsfind; use Rtsfind;
with Sem; use Sem;
with Sem_Ch7; use Sem_Ch7;
@@ -215,10 +217,16 @@ package body Exp_Ch13 is
Typ : Entity_Id := Etype (Expr);
begin
+ -- Certain run-time configurations and targets do not provide support
+ -- for controlled types.
+
+ if Restriction_Active (No_Finalization) then
+ return;
+
-- Do not create a specialized Deallocate since .NET/JVM compilers do
-- not support pools and address arithmetic.
- if VM_Target /= No_VM then
+ elsif VM_Target /= No_VM then
return;
end if;