[Ada] Spurious error on Predicate_Failure aspect
authorArnaud Charlet <charlet@adacore.com>
Thu, 4 Jun 2020 09:09:59 +0000 (05:09 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 15 Jul 2020 13:42:57 +0000 (09:42 -0400)
gcc/ada/

* sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Add proper
handling of Aspect_Predicate_Failure, consistent with
Check_Aspect_At_Freeze_Point.

gcc/ada/sem_ch13.adb

index 62836249e11614725e792902503cb5e0a63db97b..fcd94da2603adfeafbb594e58772d1cf0f40f396 100644 (file)
@@ -10519,6 +10519,8 @@ package body Sem_Ch13 is
             Preanalyze_Spec_Expression (End_Decl_Expr, T);
             Pop_Type (Ent);
 
+         elsif A_Id = Aspect_Predicate_Failure then
+            Preanalyze_Spec_Expression (End_Decl_Expr, Standard_String);
          else
             Preanalyze_Spec_Expression (End_Decl_Expr, T);
          end if;