[Ada] Infinite loop on illegal declaration
authorHristian Kirtchev <kirtchev@adacore.com>
Thu, 11 Jul 2019 08:02:07 +0000 (08:02 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 11 Jul 2019 08:02:07 +0000 (08:02 +0000)
commitf9e5da46f7708d7eaf5a080e51dd6d5553bdf37a
treee87479117811cf69184b7a5c1865a5904fcf1744
parent29c64a0f6d13bf413cf338da23580e8a94ead23c
[Ada] Infinite loop on illegal declaration

This patch updates predicate Null_Status to prevent an infinite
recursion when the argument is an illegal object declaration of an
access type.

2019-07-11  Hristian Kirtchev  <kirtchev@adacore.com>

gcc/ada/

* sem_util.adb (Null_Status): Assume that an erroneous construct
has an undefined null status.

gcc/testsuite/

* gnat.dg/self_ref1.adb: New testcase.

From-SVN: r273389
gcc/ada/ChangeLog
gcc/ada/sem_util.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/self_ref1.adb [new file with mode: 0644]