From: Piotr Trojanek Date: Fri, 28 May 2021 12:54:01 +0000 (+0200) Subject: [Ada] Avoid unnecessary call in preanalysis without freezing X-Git-Tag: basepoints/gcc-13~6123 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e12d491ceff898275074486d6927b0d44a4b8c8;p=thirdparty%2Fgcc.git [Ada] Avoid unnecessary call in preanalysis without freezing gcc/ada/ * sem_res.adb (Preanalyze_And_Resolve): Only call Set_Must_Not_Freeze when it is necessary to restore the previous value. --- diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 26e4a07ae31d..e2c069ca7400 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -1886,9 +1886,9 @@ package body Sem_Res is Expander_Mode_Restore; Full_Analysis := Save_Full_Analysis; - Set_Must_Not_Freeze (N, Save_Must_Not_Freeze); if not With_Freezing then + Set_Must_Not_Freeze (N, Save_Must_Not_Freeze); Inside_Preanalysis_Without_Freezing := Inside_Preanalysis_Without_Freezing - 1; end if;