diff options
author | Ed Schonberg <schonberg@adacore.com> | 2008-05-20 14:45:38 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-05-20 14:45:38 +0200 |
commit | 3ddca462736ddb7385b51f03631fd77501a3d852 (patch) | |
tree | 93b1a9addc3caa5bc0e197aa7964366767a6e171 /gcc/ada/exp_ch5.adb | |
parent | d70d147e3cdb82621a0f61d70e6243d64395f062 (diff) | |
download | gcc-3ddca462736ddb7385b51f03631fd77501a3d852.zip gcc-3ddca462736ddb7385b51f03631fd77501a3d852.tar.gz gcc-3ddca462736ddb7385b51f03631fd77501a3d852.tar.bz2 |
exp_ch5.adb (Expand_Assign_Record): Within an initialization procedure for a derived type retrieve the discriminant...
2008-05-20 Ed Schonberg <schonberg@adacore.com>
* exp_ch5.adb (Expand_Assign_Record): Within an initialization
procedure for a derived type retrieve the discriminant values from the
parent using the corresponding discriminant.
(Expand_N_Assignment_Statement): Skip generation of implicit
if-statement associated with controlled types if we are
compiling with restriction No_Finalization.
From-SVN: r135622
Diffstat (limited to 'gcc/ada/exp_ch5.adb')
-rw-r--r-- | gcc/ada/exp_ch5.adb | 3 |
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, |