aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ada/exp_ch5.adb3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb
index 0018a67..00ab0d6 100644
--- a/gcc/ada/exp_ch5.adb
+++ b/gcc/ada/exp_ch5.adb
@@ -1886,8 +1886,11 @@ package body Exp_Ch5 is
-- <code for controlled and/or tagged assignment>
-- end if;
+ -- Skip this if Restriction (No_Finalization) is active
+
if not Statically_Different (Lhs, Rhs)
and then Expand_Ctrl_Actions
+ and then not Restriction_Active (No_Finalization)
then
L := New_List (
Make_Implicit_If_Statement (N,