https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127026
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Eric Botcazou <[email protected]>: https://gcc.gnu.org/g:23525f49c22da2f5aca0c0e79e58635ce0345e03 commit r15-11502-g23525f49c22da2f5aca0c0e79e58635ce0345e03 Author: Eric Botcazou <[email protected]> Date: Mon Aug 24 16:38:40 2026 +0200 Ada: Fix missing sliding for assignment of aggregate to unconstrained formal This is a recent regression present on the mainline, 16 and 15 branches. The compiler fails to implement the needed sliding when an array aggregate with specified bounds is assigned to an unconstrained formal parameter, because the Must_Slide predicate considers only the case of an object declaration when the object subtype is unconstrained. gcc/ada/ PR ada/127026 * exp_aggr.adb (Must_Slide): Reorder parameters, rename Obj_Type to Ob_Typ and add Assign boolean parameter. Return Assign's value in the case where Obj_Typ is unconstrained. (Build_Array_Aggr_Code): Adjust call to Must_Slide. (In_Place_Assign_OK): Likewise. (Expand_Array_Aggregate): Likewise. gcc/testsuite/ * gnat.dg/array43.adb: New test.
