ada: Fix wrong expansion of array aggregate with noncontiguous choices
commitc8df233586990a903afe3b017d24541bc4689f08
authorEric Botcazou <ebotcazou@adacore.com>
Wed, 12 Apr 2023 17:49:05 +0000 (12 19:49 +0200)
committerMarc Poulhiès <poulhies@adacore.com>
Tue, 30 May 2023 07:12:17 +0000 (30 09:12 +0200)
treea0a3b3517dd2ea3b00d261fe6832f337722d5d8f
parentcab8bb2b3b9ab5b83ac054b088ffd925a0668bdb
ada: Fix wrong expansion of array aggregate with noncontiguous choices

This extends an earlier fix done for the others choice of an array aggregate
to all the choices of the aggregate, since the same sharing issue may happen
when the choices are not contiguous.

gcc/ada/

* exp_aggr.adb (Build_Array_Aggr_Code.Get_Assoc_Expr): Duplicate the
expression here instead of...
(Build_Array_Aggr_Code): ...here.
gcc/ada/exp_aggr.adb