From 0dd9f1b83fd8349556b5397002e505a873b866aa Mon Sep 17 00:00:00 2001 From: Bob Duff Date: Sat, 14 Mar 2020 14:32:31 -0400 Subject: [PATCH] [Ada] Fix unnesting crash with Predicate_Failure/no pred 2020-06-11 Bob Duff 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 | 2 -- 1 file changed, 2 deletions(-) diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index cb33439f352..f73b55aa443 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -2540,8 +2540,6 @@ package body Sem_Ch13 is Expression => Relocate_Node (Expr))), Pragma_Name => Name_Predicate_Failure); - Set_Has_Predicates (E); - -- If the type is private, indicate that its completion -- has a freeze node, because that is the one that will -- be visible at freeze time. -- 2.30.2