aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2021-05-28 14:54:01 +0200
committerPierre-Marie de Rodat <derodat@adacore.com>2021-07-09 12:35:23 +0000
commit7e12d491ceff898275074486d6927b0d44a4b8c8 (patch)
tree8a6170f67401ba5031ca8dcd438609c0f9ec5348 /gcc/ada
parente37e175e7dc3376244eb7705269ada6755616831 (diff)
downloadgcc-7e12d491ceff898275074486d6927b0d44a4b8c8.zip
gcc-7e12d491ceff898275074486d6927b0d44a4b8c8.tar.gz
gcc-7e12d491ceff898275074486d6927b0d44a4b8c8.tar.bz2
[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.
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/sem_res.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb
index 26e4a07..e2c069c 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;