https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99095
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Eric Botcazou <ebotca...@gcc.gnu.org>: https://gcc.gnu.org/g:168b75ff54b4e70650b8709816edff13f93e737a commit r11-7456-g168b75ff54b4e70650b8709816edff13f93e737a Author: Eric Botcazou <ebotca...@adacore.com> Date: Tue Mar 2 17:58:46 2021 +0100 Fix PR ada/99095 This is a regression present on the mainline and 10 branch, where we fail to make the bounds explicit for the return value of a function returning an unconstrained array of a limited record type. gcc/ada/ PR ada/99095 * sem_ch8.adb (Check_Constrained_Object): Restrict again the special optimization for limited types to non-array types except in the case of an extended return statement. gcc/testsuite/ * gnat.dg/limited5.adb: New test.