summaryrefslogtreecommitdiff
path: root/gcc/ada/exp_util.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-02 07:42:02 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-02 07:42:02 +0000
commite4caa3ff787f34c6127a5398a6b768fdcf3783a8 (patch)
tree1f2038976e3af2cad4e6cafba381cd8f89549f8b /gcc/ada/exp_util.adb
parent4da9eaf90e19ea967af478669621fa97d20f624d (diff)
downloadgcc-e4caa3ff787f34c6127a5398a6b768fdcf3783a8.tar.gz
2011-09-02 Robert Dewar <dewar@adacore.com>
* exp_util.adb, sem_ch10.adb, sem_attr.adb, s-htable.adb, g-comlin.adb, g-comlin.ads, lib-xref-alfa.adb, lib-xref.adb: Minor reformatting. 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch3.adb: (Set_Anonymous_Type): Associate the itype of an inherited component with the enclosing derived type. Code reformatting. 2011-09-02 Gary Dismukes <dismukes@adacore.com> * checks.adb: (Determine_Range): Add test of OK1 to prevent the early return done when overflow checks are enabled, since comparisons against Lor and Hir should not be done when OK1 is False. 2011-09-02 Gary Dismukes <dismukes@adacore.com> * exp_ch6.adb (Add_Finalization_Master_Actual_To_Build_In_Place_Call): Add new formal Master_Exp. When present, add that expression to the call as an extra actual. (Make_Build_In_Place_Call_In_Object_Declaration): Add variable Fmaster_Actual and in the case of a BIP call initializing a return object of an enclosing BIP function set it to a new reference to the implicit finalization master formal of the enclosing function. Fmaster_Actual is then passed to the new formal Master_Exp on the call to Add_Finalization_Master_Actual_To_Build_ In_Place_Call. Move initializations of Enclosing_Func to its declaration. 2011-09-02 Thomas Quinot <quinot@adacore.com> * csets.ads: Minor reformatting 2011-09-02 Hristian Kirtchev <kirtchev@adacore.com> * exp_aggr.adb: (Get_Constraint_Association): Add code to retrieve the full view of a private type coming from an instantiation. * exp_ch4.adb: (Current_Anonymous_Master): Reimplement the search loop to iterate over the declarations rather than use the First_Entity / Next_Entity scheme. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178438 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/exp_util.adb')
-rw-r--r--gcc/ada/exp_util.adb27
1 files changed, 13 insertions, 14 deletions
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index 65311f8eec3..736d3d03db7 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -3901,7 +3901,6 @@ package body Exp_Util is
begin
Change := True;
Ren_Obj := Renamed_Object (Defining_Identifier (Ren_Decl));
-
while Change loop
Change := False;
@@ -3971,7 +3970,6 @@ package body Exp_Util is
function Is_Allocated (Trans_Id : Entity_Id) return Boolean is
Expr : constant Node_Id := Expression (Parent (Trans_Id));
-
begin
return
Is_Access_Type (Etype (Trans_Id))
@@ -3994,30 +3992,30 @@ package body Exp_Util is
and then Requires_Transient_Scope (Desig)
and then Nkind (Rel_Node) /= N_Simple_Return_Statement
- -- Do not consider renamed or 'reference-d transient objects because
- -- the act of renaming extends the object's lifetime.
+ -- Do not consider renamed or 'reference-d transient objects because
+ -- the act of renaming extends the object's lifetime.
and then not Is_Aliased (Obj_Id, Decl)
- -- Do not consider transient objects allocated on the heap since they
- -- are attached to a finalization master.
+ -- Do not consider transient objects allocated on the heap since
+ -- they are attached to a finalization master.
and then not Is_Allocated (Obj_Id)
- -- If the transient object is a pointer, check that it is not
- -- initialized by a function which returns a pointer or acts as a
- -- renaming of another pointer.
+ -- If the transient object is a pointer, check that it is not
+ -- initialized by a function which returns a pointer or acts as a
+ -- renaming of another pointer.
and then
(not Is_Access_Type (Obj_Typ)
or else not Initialized_By_Access (Obj_Id))
- -- Do not consider transient objects which act as indirect aliases of
- -- build-in-place function results.
+ -- Do not consider transient objects which act as indirect aliases
+ -- of build-in-place function results.
and then not Initialized_By_Aliased_BIP_Func_Call (Obj_Id)
- -- Do not consider conversions of tags to class-wide types
+ -- Do not consider conversions of tags to class-wide types
and then not Is_Tag_To_CW_Conversion (Obj_Id);
end Is_Finalizable_Transient;
@@ -4200,8 +4198,7 @@ package body Exp_Util is
begin
-- If component reference is for an array with non-static bounds,
-- then it is always aligned: we can only process unaligned arrays
- -- with static bounds (more accurately bounds known at compile
- -- time).
+ -- with static bounds (more precisely compile time known bounds).
if Is_Array_Type (T)
and then not Compile_Time_Known_Bounds (T)
@@ -4262,6 +4259,8 @@ package body Exp_Util is
-- alignment, and we either know it is too small, or cannot tell,
-- then the component may be unaligned.
+ -- What is the following commented out code ???
+
-- if Known_Alignment (Etype (P))
-- and then Alignment (Etype (P)) < Ttypes.Maximum_Alignment
-- and then M > Alignment (Etype (P))