[Ada] Internal error on iterator for limited private discriminated type
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 22 Jul 2019 13:57:09 +0000 (13:57 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 22 Jul 2019 13:57:09 +0000 (13:57 +0000)
commite7f4682af254be73f91ddbb543bc0bc3fcd27659
tree2941b1fc84b3f7262d5c60e646621c1d9818cbd7
parentfd90c808628cead705bb4521d9b8beea0edcf2bf
[Ada] Internal error on iterator for limited private discriminated type

This patch further extends the short-circuit, aka optimization, present
in the Check_Constrained_Object procedure used for renaming declarations
to all limited types, so as to prevent type mismatches downstream in
more cases.

2019-07-22  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

* sem_ch8.adb (Check_Constrained_Object): Further extend the
special optimization to all limited types.

gcc/testsuite/

* gnat.dg/iter5.adb, gnat.dg/iter5_pkg.ads: New testcase.

From-SVN: r273677
gcc/ada/ChangeLog
gcc/ada/sem_ch8.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/iter5.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/iter5_pkg.ads [new file with mode: 0644]