]> gcc.gnu.org Git - gcc.git/commitdiff
ada: Fix wrong expansion of limited extension aggregate
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 21 Apr 2023 16:30:48 +0000 (18:30 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 13 Jun 2023 07:31:44 +0000 (09:31 +0200)
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.

gcc/ada/exp_aggr.adb

index c145d79f48292bd6ccc3c938b6d5809a0389a179..1523057112393f401bfca4a0f3eaf2852bd66995 100644 (file)
@@ -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.
This page took 0.073117 seconds and 5 git commands to generate.