aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_util.ads
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-04-02 11:23:01 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2012-04-02 11:23:01 +0200
commita429e6b3c30e3d917f1e1145146b18d57607cf58 (patch)
tree9c441de71e752a3df9cf6bc42e11a24f3e70edda /gcc/ada/exp_util.ads
parente228f7eed275e585d48c92dc87bde3dd0784e4d2 (diff)
downloadgcc-a429e6b3c30e3d917f1e1145146b18d57607cf58.zip
gcc-a429e6b3c30e3d917f1e1145146b18d57607cf58.tar.gz
gcc-a429e6b3c30e3d917f1e1145146b18d57607cf58.tar.bz2
[multiple changes]
2012-04-02 Hristian Kirtchev <kirtchev@adacore.com> * exp_ch7.adb (Process_Declarations): Detect a case where a source object was initialized by another source object, but the expression was rewritten as a class-wide conversion of Ada.Tags.Displace. * exp_util.adb (Initialized_By_Ctrl_Function): Removed. (Is_Controlled_Function_Call): New routine. (Is_Displacement_Of_Ctrl_Function_Result): Removed. (Is_Displacement_Of_Object_Or_Function_Result): New routine. (Is_Source_Object): New routine. (Requires_Cleanup_Actions): Detect a case where a source object was initialized by another source object, but the expression was rewritten as a class-wide conversion of Ada.Tags.Displace. * exp_util.ads (Is_Displacement_Of_Ctrl_Function_Result): Removed. (Is_Displacement_Of_Object_Or_Function_Result): New routine. 2012-04-02 Ed Schonberg <schonberg@adacore.com> * sem_res.adb (Resolve_Call): A call to an expression function does not freeze if it appears in a different scope from the expression function itself. Such calls appear in the generated bodies of other expression functions, or in pre/postconditions of subsequent subprograms. From-SVN: r186071
Diffstat (limited to 'gcc/ada/exp_util.ads')
-rw-r--r--gcc/ada/exp_util.ads9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/ada/exp_util.ads b/gcc/ada/exp_util.ads
index 535a4ff..9f3ae2a 100644
--- a/gcc/ada/exp_util.ads
+++ b/gcc/ada/exp_util.ads
@@ -521,11 +521,12 @@ package Exp_Util is
-- False otherwise. True for an empty list. It is an error to call this
-- routine with No_List as the argument.
- function Is_Displacement_Of_Ctrl_Function_Result
+ function Is_Displacement_Of_Object_Or_Function_Result
(Obj_Id : Entity_Id) return Boolean;
- -- Determine whether Obj_Id is a source object that has been initialized by
- -- a controlled function call later rewritten as a class-wide conversion of
- -- Ada.Tags.Displace.
+ -- Determine whether Obj_Id is a source entity that has been initialized by
+ -- either a controlled function call or the assignment of another source
+ -- object. In both cases the initialization expression is rewritten as a
+ -- class-wide conversion of Ada.Tags.Displace.
function Is_Finalizable_Transient
(Decl : Node_Id;