https://gcc.gnu.org/g:2effa706f1c6000349cdb4fcd74dd771fcee5d03

commit r17-782-g2effa706f1c6000349cdb4fcd74dd771fcee5d03
Author: Viljar Indus <[email protected]>
Date:   Wed Feb 4 14:35:48 2026 +0200

    ada: Fix Assertion_Level dependency for Runtime level
    
    gcc/ada/ChangeLog:
    
            * sem_util.adb (Depends_On_Level): Fix condition for Runtime
            level.

Diff:
---
 gcc/ada/sem_util.adb | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 31a64ea4b120..8119fa43d64f 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -7387,6 +7387,12 @@ package body Sem_Util is
       pragma Assert (Ekind (Self) = E_Assertion_Level);
       pragma Assert (Ekind (Other) = E_Assertion_Level);
 
+      if Other = Standard_Level_Runtime
+         and then not Is_Same_Or_Depends_On_Level (Self, Standard_Level_Static)
+      then
+         return True;
+      end if;
+
       if No (Parent_Levels (Self)) then
          return False;
       end if;

Reply via email to