[Ada] Fix unnesting crash with Predicate_Failure/no pred
authorBob Duff <duff@adacore.com>
Sat, 14 Mar 2020 18:32:31 +0000 (14:32 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Thu, 11 Jun 2020 09:53:36 +0000 (05:53 -0400)
commit0dd9f1b83fd8349556b5397002e505a873b866aa
tree7fc48a3cc84a5de12653890ca40b6532520793f7
parenta91b983325449c68f2f497a1662a4b85c47ce1a9
[Ada] Fix unnesting crash with Predicate_Failure/no pred

2020-06-11  Bob Duff  <duff@adacore.com>

gcc/ada/

* sem_ch13.adb (Analyze_Aspect_Specifications): Do not set the
Has_Predicates flag when the Predicate_Failure aspect is seen.
It is legal (but pointless) to use this aspect without a
predicate.  If we set the flag, we generate a half-baked
Predicate procedure, and if that procedure is nested, it causes
unnesting to crash.
gcc/ada/sem_ch13.adb