[Ada] Assertion failure on validity check for Address
authorHristian Kirtchev <kirtchev@adacore.com>
Mon, 8 Jul 2019 08:14:27 +0000 (08:14 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 8 Jul 2019 08:14:27 +0000 (08:14 +0000)
commit570d5bbc7b7c5f7eb0eb03660a93687a6698ae7e
tree01098a79c7af2350fd4b1f213ff5cce95ebd8006
parent47bcd81fe7f8f9251f0777ae5ee77520b615af26
[Ada] Assertion failure on validity check for Address

This patch corrects the verification of 'Address clauses to avoid
processing a clause where the prefix of the attribute is a generic
formal object.

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

gcc/ada/

* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Do not
register an address clause when its prefix denotes a generic
formal object.

gcc/testsuite/

* gnat.dg/addr13.adb, gnat.dg/addr13.ads: New testcase.

From-SVN: r273218
gcc/ada/ChangeLog
gcc/ada/sem_ch13.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/addr13.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/addr13.ads [new file with mode: 0644]