aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch7.adb
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-10-24 09:50:25 +0200
committerMarc Poulhiès <poulhies@adacore.com>2023-11-21 10:57:41 +0100
commit6f69104c9e7cc455cc83139b063c08124e465f64 (patch)
tree664024a670bece496e9d40e2e48bfeda7fb2b63b /gcc/ada/exp_ch7.adb
parentfee97b366b10acbbc0aa5300c2ad753c18d2b266 (diff)
downloadgcc-6f69104c9e7cc455cc83139b063c08124e465f64.zip
gcc-6f69104c9e7cc455cc83139b063c08124e465f64.tar.gz
gcc-6f69104c9e7cc455cc83139b063c08124e465f64.tar.bz2
ada: Further cleanup in finalization machinery
This removes the specific treatment of transient scopes in initialization procedures, which is obsolete. gcc/ada/ * exp_aggr.adb (Convert_To_Assignments): Do not treat initialization procedures specially when it comes to creating a transient scope. * exp_ch7.adb (Build_Finalizer.Process_Declarations): Likewise. * exp_util.adb (Requires_Cleanup_Actions): Likewise.
Diffstat (limited to 'gcc/ada/exp_ch7.adb')
-rw-r--r--gcc/ada/exp_ch7.adb29
1 files changed, 0 insertions, 29 deletions
diff --git a/gcc/ada/exp_ch7.adb b/gcc/ada/exp_ch7.adb
index 2e3da4c..ef3b5c9 100644
--- a/gcc/ada/exp_ch7.adb
+++ b/gcc/ada/exp_ch7.adb
@@ -2479,35 +2479,6 @@ package body Exp_Ch7 is
and then Present (Library_Unit (Decl))
then
Process_Package_Body (Proper_Body (Unit (Library_Unit (Decl))));
-
- -- Handle a rare case caused by a controlled transient object
- -- created as part of a record init proc. The variable is wrapped
- -- in a block, but the block is not associated with a transient
- -- scope.
-
- elsif Nkind (Decl) = N_Block_Statement
- and then Inside_Init_Proc
- then
- Old_Counter_Val := Counter_Val;
-
- if Present (Handled_Statement_Sequence (Decl)) then
- Process_Declarations
- (Statements (Handled_Statement_Sequence (Decl)),
- Preprocess);
- end if;
-
- Process_Declarations (Declarations (Decl), Preprocess);
-
- -- Either the declaration or statement list of the block has a
- -- controlled object.
-
- if Preprocess
- and then Top_Level
- and then No (Last_Top_Level_Ctrl_Construct)
- and then Counter_Val > Old_Counter_Val
- then
- Last_Top_Level_Ctrl_Construct := Decl;
- end if;
end if;
Prev_Non_Pragma (Decl);