]> git.ipfire.org Git - thirdparty/gcc.git/commit
ada: Small fix in expansion of array aggregates handled by the back end
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 11 Nov 2024 13:36:59 +0000 (14:36 +0100)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 19 Nov 2024 12:58:50 +0000 (13:58 +0100)
commite93d685129155cb4ffd159e72ec40cbff7f2d82d
tree529e838219a69d5aed73d462d1b91a59e8465133
parent7387bd77db523fc0347763785c70975da1579245
ada: Small fix in expansion of array aggregates handled by the back end

The (minimal) expansion is now done by Build_Array_Aggr_Code in all cases,
which means that it must prevent the aggregate from being re-analyzed as
the RHS of the assignment, which may trigger a bogus warning and lead to
another useless rewriting.

The change also inlines Build_Assignment_With_Temporary that is now called
only once by Build_Array_Aggr_Code for this processing.

gcc/ada/ChangeLog:

* exp_aggr.adb (Build_Assignment_With_Temporary): Inline into...
(Build_Array_Aggr_Code): ...this.  Set the Analyzed flag on the
relocated aggregate if it is to be handled by the back-end.
gcc/ada/exp_aggr.adb