]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Lift technical limitation in expansion of record aggregates
authorEric Botcazou <ebotcazou@adacore.com>
Sun, 17 Nov 2024 19:26:53 +0000 (20:26 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Thu, 12 Dec 2024 09:57:56 +0000 (10:57 +0100)
commit10131a4d6e48aea7ae67f0a9f17bd74841d03cff
treee99d0e560336e9a417e9079bca7b33df38e9fdbf
parent3e4b9c67861eef93a262aa1d87d903fbf3a2ae87
ada: Lift technical limitation in expansion of record aggregates

The mechanim deferring the expansion of record aggregates nested in other
aggregates with intermediate conditional expressions is disabled in the
case where they contain self-references, because of a technical limitation
in the replacements done by Build_Record_Aggr_Code.  This change lifts it.

gcc/ada/ChangeLog:

* exp_aggr.adb (Traverse_Proc_For_Aggregate): New generic procedure.
(Replace_Discriminants): Instantiate it instead of Traverse_Proc.
(Replace_Self_Reference): Likewise.
(Convert_To_Assignments): Remove limitation for nested aggregates
that contain self-references.
gcc/ada/exp_aggr.adb