]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix PR ada/99095
authorEric Botcazou <ebotcazou@adacore.com>
Tue, 2 Mar 2021 16:58:46 +0000 (17:58 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Tue, 2 Mar 2021 17:00:09 +0000 (18:00 +0100)
commit168b75ff54b4e70650b8709816edff13f93e737a
tree251d6f96b18c4eeaf8a7be5ce10a875cc7c7d8dc
parentf8e4d7a6597fa81ff927156a5f5d10b7fdaa0bc0
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.
gcc/ada/sem_ch8.adb
gcc/testsuite/gnat.dg/limited5.adb [new file with mode: 0644]