https://gcc.gnu.org/g:d57092f2f3331c333c92296661a310d0285bd576

commit r16-3684-gd57092f2f3331c333c92296661a310d0285bd576
Author: Viljar Indus <[email protected]>
Date:   Mon Jul 28 16:06:27 2025 +0300

    ada: Add default assertion level for assertions
    
    To standardize the comparisson between the levels of ghost
    entities and levels of assertion pragmasTo standardize the comparisson
    between the levels of ghost
    entities and levels of assertion pragmas.
    
    gcc/ada/ChangeLog:
    
            * sem_ch13.adb (Analyze_Aspect_Specifications): add default
            assertion level to assertion aspects.
            * sem_prag.adb (Analyze_Pragma): Likewise.

Diff:
---
 gcc/ada/sem_ch13.adb | 2 ++
 gcc/ada/sem_prag.adb | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index ce76b7dca016..f0caf9602694 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -3272,6 +3272,8 @@ package body Sem_Ch13 is
                   goto Continue;
                else
                   Check_Applicable_Policy (Aspect);
+                  Set_Aspect_Ghost_Assertion_Level
+                    (Aspect, Standard_Level_Default);
                end if;
 
             end if;
diff --git a/gcc/ada/sem_prag.adb b/gcc/ada/sem_prag.adb
index 8bb309e64cc8..e73cdedb4f6a 100644
--- a/gcc/ada/sem_prag.adb
+++ b/gcc/ada/sem_prag.adb
@@ -12734,6 +12734,8 @@ package body Sem_Prag is
 
          else
             Check_Applicable_Policy (N, Empty);
+            Set_Pragma_Ghost_Assertion_Level
+              (N, Standard_Level_Default);
          end if;
       end if;

Reply via email to