aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_ch4.adb
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2021-06-03 12:10:30 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2021-07-08 13:34:23 +0000
commit7c092960f0d116abdba7e13aaf38fbadfdefbeb0 (patch)
tree5212d98fc41671e89ba1ecb386fb4267bf0159af /gcc/ada/exp_ch4.adb
parent6e8b502cb6c3e30ac59fc446b2e765e5b5a9d5a6 (diff)
downloadgcc-7c092960f0d116abdba7e13aaf38fbadfdefbeb0.zip
gcc-7c092960f0d116abdba7e13aaf38fbadfdefbeb0.tar.gz
gcc-7c092960f0d116abdba7e13aaf38fbadfdefbeb0.tar.bz2
[Ada] Transient scope cleanup
gcc/ada/ * comperr.adb (Compiler_Abort): Call Sinput.Unlock, because if this is called late, then Source_Dump would crash otherwise. * debug.adb: Correct documentation of the -gnatd.9 switch. * exp_ch4.adb (Expand_Allocator_Expression): Add a comment. * exp_ch6.adb: Minor comment fixes. Add assertion. * exp_ch6.ads (Is_Build_In_Place_Result_Type): Correct comment. * exp_ch7.adb, checks.ads: Minor comment fixes.
Diffstat (limited to 'gcc/ada/exp_ch4.adb')
-rw-r--r--gcc/ada/exp_ch4.adb3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 0c5b3a2..16f513e 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -1166,6 +1166,9 @@ package body Exp_Ch4 is
-- secondary stack). In that case, the object will be moved, so we do
-- want to Adjust. However, if it's a nonlimited build-in-place
-- function call, Adjust is not wanted.
+ --
+ -- Needs_Finalization (DesigT) can differ from Needs_Finalization (T)
+ -- if one of the two types is class-wide, and the other is not.
if Needs_Finalization (DesigT)
and then Needs_Finalization (T)