From: Arnaud Charlet Date: Mon, 22 Jun 2020 10:18:14 +0000 (-0400) Subject: [Ada] Double evaluation of predicate X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=96ece83775334d8125c16c4c3dcc607b511bc7b2;p=gcc.git [Ada] Double evaluation of predicate gcc/ada/ * sem_ch13.adb (Add_Predicates): Prevent analyzing twice the same pragma in case an inner package references the type with a predicate (as opposed to defining the type). --- diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb index 28fd1ed080c..a322466f2ed 100644 --- a/gcc/ada/sem_ch13.adb +++ b/gcc/ada/sem_ch13.adb @@ -9746,7 +9746,7 @@ package body Sem_Ch13 is elsif Nkind (Ritem) = N_Aspect_Specification and then Present (Aspect_Rep_Item (Ritem)) - and then Scope (Typ) /= Current_Scope + and then Scope_Depth (Scope (Typ)) > Scope_Depth (Current_Scope) then declare Prag : constant Node_Id := Aspect_Rep_Item (Ritem);