public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/autopar_devel] [Ada] Fix unnesting crash with Predicate_Failure/no pred
@ 2020-08-22 22:24 Giuliano Belinassi
  0 siblings, 0 replies; only message in thread
From: Giuliano Belinassi @ 2020-08-22 22:24 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:ef71af1d4a2551c92a3453530c592c29a97f0838

commit ef71af1d4a2551c92a3453530c592c29a97f0838
Author: Bob Duff <duff@adacore.com>
Date:   Sat Mar 14 14:32:31 2020 -0400

    [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.

Diff:
---
 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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-08-22 22:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-22 22:24 [gcc/devel/autopar_devel] [Ada] Fix unnesting crash with Predicate_Failure/no pred Giuliano Belinassi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).