summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch3.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-29 11:12:17 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-29 11:12:17 +0000
commit53c179ea5916bba5222b8f1c26c676ec7a7eef94 (patch)
tree814b7943f7ccb8cd2729a81e53f68f45e54ea661 /gcc/ada/exp_ch3.adb
parentb0bc40fdc42f6914baeeee0c860fcd6bd0197cfa (diff)
downloadgcc-53c179ea5916bba5222b8f1c26c676ec7a7eef94.tar.gz
2011-08-29 Robert Dewar <dewar@adacore.com>
* a-exexpr-gcc.adb, a-synbar.adb, sem_ch13.adb: Minor reformatting. 2011-08-29 Bob Duff <duff@adacore.com> * sem_aggr.adb (Resolve_Aggr_Expr): Call this routine even in the case of <>, because this is the routine that checks for dimensionality errors (for example, for a two-dimensional array, (others => <>) should be (others => (others => <>)). 2011-08-29 Hristian Kirtchev <kirtchev@adacore.com> * impunit.adb: Add new run-time units. * freeze.adb, exp_ch7.ads, exp_ch7.adb, exp_util.ads, exp_util.adb, s-stposu.ads, s-stposu.adb: Code clean up. Handle protected class-wide or task class-wide types Handle C/C++/CIL/Java types. * s-spsufi.adb, s-spsufi.ads: New files. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178205 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_ch3.adb')
-rw-r--r--gcc/ada/exp_ch3.adb38
1 files changed, 17 insertions, 21 deletions
diff --git a/gcc/ada/exp_ch3.adb b/gcc/ada/exp_ch3.adb
index 2ba20e5565f..a22f86dff88 100644
--- a/gcc/ada/exp_ch3.adb
+++ b/gcc/ada/exp_ch3.adb
@@ -6626,35 +6626,31 @@ package body Exp_Ch3 is
-- finalization support if not needed.
if not Comes_From_Source (Def_Id)
- and then not Has_Private_Declaration (Def_Id)
+ and then not Has_Private_Declaration (Def_Id)
then
null;
- elsif (Needs_Finalization (Desig_Type)
- and then Convention (Desig_Type) /= Convention_Java
- and then Convention (Desig_Type) /= Convention_CIL)
- or else
- (Is_Incomplete_Or_Private_Type (Desig_Type)
- and then No (Full_View (Desig_Type))
-
- -- An exception is made for types defined in the run-time
- -- because Ada.Tags.Tag itself is such a type and cannot
- -- afford this unnecessary overhead that would generates a
- -- loop in the expansion scheme...
-
- and then not In_Runtime (Def_Id)
-
- -- Another exception is if Restrictions (No_Finalization)
- -- is active, since then we know nothing is controlled.
+ -- An exception is made for types defined in the run-time because
+ -- Ada.Tags.Tag itself is such a type and cannot afford this
+ -- unnecessary overhead that would generates a loop in the
+ -- expansion scheme. Another exception is if Restrictions
+ -- (No_Finalization) is active, since then we know nothing is
+ -- controlled.
- and then not Restriction_Active (No_Finalization))
+ elsif Restriction_Active (No_Finalization)
+ or else In_Runtime (Def_Id)
+ then
+ null;
- -- If the designated type is not frozen yet, its controlled
- -- status must be retrieved explicitly.
+ -- The machinery assumes that incomplete or private types are
+ -- always completed by a controlled full vies.
+ elsif Needs_Finalization (Desig_Type)
+ or else
+ (Is_Incomplete_Or_Private_Type (Desig_Type)
+ and then No (Full_View (Desig_Type)))
or else
(Is_Array_Type (Desig_Type)
- and then not Is_Frozen (Desig_Type)
and then Needs_Finalization (Component_Type (Desig_Type)))
then
Build_Finalization_Master (Def_Id);