From: Piotr Trojanek <troja...@adacore.com>

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.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 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 a7936641d34..c8fe7d367c1 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 =>
-- 
2.45.2

Reply via email to