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

commit r15-2619-ged5481b5c9368b9010120249ff5d63467df09948
Author: Piotr Trojanek <troja...@adacore.com>
Date:   Fri Jun 21 15:27:41 2024 +0200

    ada: Remove Must_Not_Freeze flags from default value expressions
    
    This is a code cleanup and apparently has no impact on the behavior.
    
    The Must_Not_Freeze is saved/set/restored by Preanalyze_Spec_Expression,
    so it doesn't need to be set before calling that routine and apparently
    doesn't need to be set after that calling that routine either.
    
    gcc/ada/
    
            * sem_ch13.adb (Resolve_Aspect_Expression): Don't set
            Must_Not_Freeze before preanalyzing spec expressions.

Diff:
---
 gcc/ada/sem_ch13.adb | 2 --
 1 file changed, 2 deletions(-)

diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb
index a7936641d343..c8fe7d367c10 100644
--- a/gcc/ada/sem_ch13.adb
+++ b/gcc/ada/sem_ch13.adb
@@ -16060,7 +16060,6 @@ package body Sem_Ch13 is
                   --  before the actual freeze point.
 
                   when Aspect_Default_Value =>
-                     Set_Must_Not_Freeze (Expr);
                      Preanalyze_Spec_Expression (Expr, E);
 
                   when Aspect_CPU
@@ -16076,7 +16075,6 @@ package body Sem_Ch13 is
                   --  relevant to the misuse of deferred constants.
 
                   when Aspect_Storage_Size =>
-                     Set_Must_Not_Freeze (Expr);
                      Preanalyze_Spec_Expression (Expr, Any_Integer);
 
                   when others =>

Reply via email to