]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Fix Assertion_Level dependency for Runtime level
authorViljar Indus <indus@adacore.com>
Wed, 4 Feb 2026 12:35:48 +0000 (14:35 +0200)
committerMarc Poulhiès <dkm@gcc.gnu.org>
Tue, 26 May 2026 08:38:20 +0000 (10:38 +0200)
gcc/ada/ChangeLog:

* sem_util.adb (Depends_On_Level): Fix condition for Runtime
level.

gcc/ada/sem_util.adb

index 31a64ea4b120ddb6bb5a19df466b7c87295a7536..8119fa43d64f9a25ed3ef057b837cd0ee63bcc3f 100644 (file)
@@ -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;