From 7e12d491ceff898275074486d6927b0d44a4b8c8 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Fri, 28 May 2021 14:54:01 +0200 Subject: [PATCH] [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. --- gcc/ada/sem_res.adb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 26e4a07ae31..e2c069ca740 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;