[Ada] Crash on predicate in full view in a generic unit
authorEd Schonberg <schonberg@adacore.com>
Thu, 19 Sep 2019 08:13:20 +0000 (08:13 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 19 Sep 2019 08:13:20 +0000 (08:13 +0000)
commit890cde5319470afab7e96e3b7953075681c015f5
tree60fde4523f7cb6c05caebbd1cc2f664e7ba1b76c
parentf56add9cb032cb4b22abbb33a7b867bfcbbc5f0d
[Ada] Crash on predicate in full view in a generic unit

This patch fixes a compiler abort on a dynamic predicate applied to the
full view of a type in a generic package declaration, when the
expression for the predicate is a conditionql expression that contains
references to components of the full view of the type.

2019-09-19  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Simplify
handling of expressions in predicates when the context is a
generic unit.

gcc/testsuite/

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

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