From: Viljar Indus Date: Tue, 2 Sep 2025 14:11:14 +0000 (+0300) Subject: ada: Match assertion levels by name X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dde7f4252e32b47493a2a6ce45d8d29bede4b2db;p=thirdparty%2Fgcc.git ada: Match assertion levels by name Since Assertion_Levels cannot be named after valid assertion names we no longer need the policies to be matched by entity. gcc/ada/ChangeLog: * sem_prag.adb (Get_Applicable_Policy): Match assertion levels by name. --- diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb index 172dc3d6f3e..b1fefa8a297 100644 --- a/gcc/ada/sem_prag.adb +++ b/gcc/ada/sem_prag.adb @@ -34217,7 +34217,7 @@ package body Sem_Prag is or else P_Nam = Name_Assertion or else (P_Nam = Name_Statement_Assertions and then Is_Statement_Assertion (Nam)) - or else (Present (Level) and then Entity (P_Arg) = Level) + or else (Present (Level) and then P_Nam = Chars (Level)) then return Chars (Get_Pragma_Arg (Last (Assocs))); end if;