diff options
author | Javier Miranda <miranda@adacore.com> | 2020-04-30 11:55:42 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-06-19 04:17:18 -0400 |
commit | 7841c99268adfaba9c30be23ce7569c85cae52dc (patch) | |
tree | cdf40bce5eae4592adda8302ff4e15b39ff7a3fc /gcc/ada/exp_ch3.ads | |
parent | b6c2ec499709f26af66a5327b1ff0ee345f5fa87 (diff) | |
download | gcc-7841c99268adfaba9c30be23ce7569c85cae52dc.zip gcc-7841c99268adfaba9c30be23ce7569c85cae52dc.tar.gz gcc-7841c99268adfaba9c30be23ce7569c85cae52dc.tar.bz2 |
[Ada] ACATS 4.1G - C760A02 - Near infinite finalization
2020-06-19 Javier Miranda <miranda@adacore.com>
gcc/ada/
* exp_ch3.ads (Ensure_Activation_Chain_And_Master): New
subprogram.
* exp_ch3.adb (Ensure_Activation_Chain_And_Master): New
subprogram that factorizes code.
(Expand_N_Object_Declaration): Call new subprogram.
* sem_ch6.adb (Analyze_Function_Return): Returning a
build-in-place unconstrained array type defer the full analysis
of the returned object to avoid generating the corresponding
constrained subtype; otherwise the bounds would be created in
the stack and a dangling reference would be returned pointing to
the bounds.
Diffstat (limited to 'gcc/ada/exp_ch3.ads')
-rw-r--r-- | gcc/ada/exp_ch3.ads | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/exp_ch3.ads b/gcc/ada/exp_ch3.ads index fcbe83b..954b5a2 100644 --- a/gcc/ada/exp_ch3.ads +++ b/gcc/ada/exp_ch3.ads @@ -101,6 +101,13 @@ package Exp_Ch3 is -- Build the body of the equality function Body_Id for the untagged variant -- record Typ with the given parameters specification list. + procedure Ensure_Activation_Chain_And_Master (Obj_Decl : Node_Id); + -- If tasks are being declared (or might be declared) by the given object + -- declaration then ensure to have an activation chain defined for the + -- tasks (has no effect if we already have one), and also that a Master + -- variable is established (and that the appropriate enclosing construct + -- is established as a task master). + function Freeze_Type (N : Node_Id) return Boolean; -- This function executes the freezing actions associated with the given -- freeze type node N and returns True if the node is to be deleted. We |