From: Piotr Trojanek Date: Fri, 21 Jun 2024 13:27:41 +0000 (+0200) Subject: ada: Remove Must_Not_Freeze flags from default value expressions X-Git-Tag: basepoints/gcc-16~6934 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed5481b5c9368b9010120249ff5d63467df09948;p=thirdparty%2Fgcc.git 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 --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 =>