aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-04-21 18:30:48 +0200
committerMarc Poulhiès <poulhies@adacore.com>2023-06-13 09:31:44 +0200
commitae3fd5e8a75bf7cf18a98b0d0545ade976c1ec05 (patch)
treec21cbfe8cf69065c64b6633cf810df1a46ca0510 /gcc
parent5c266974094ec997a0e83fc763fa4a6ff4b96005 (diff)
downloadgcc-ae3fd5e8a75bf7cf18a98b0d0545ade976c1ec05.zip
gcc-ae3fd5e8a75bf7cf18a98b0d0545ade976c1ec05.tar.gz
gcc-ae3fd5e8a75bf7cf18a98b0d0545ade976c1ec05.tar.bz2
ada: Fix wrong expansion of limited extension aggregate
This happens when the ancestor part is itself an aggregate: in this case, the tag of the extension aggregate is wrongly set to that of the ancestor. gcc/ada/ * exp_aggr.adb (Build_Record_Aggr_Code): In the case of an extension aggregate of a limited type whose ancestor part is an aggregate, do not skip the final code assigning the tag of the extension.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/exp_aggr.adb2
1 files changed, 0 insertions, 2 deletions
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index c145d79..1523057 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -3039,8 +3039,6 @@ package body Exp_Aggr is
and then Nkind (Unqualify (Ancestor)) in
N_Aggregate | N_Extension_Aggregate
then
- Ancestor_Is_Expression := True;
-
-- Set up finalization data for enclosing record, because
-- controlled subcomponents of the ancestor part will be
-- attached to it.