public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-2190] [Ada] Avoid unnecessary call in preanalysis without freezing
@ 2021-07-09 12:37 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-07-09 12:37 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:7e12d491ceff898275074486d6927b0d44a4b8c8

commit r12-2190-g7e12d491ceff898275074486d6927b0d44a4b8c8
Author: Piotr Trojanek <trojanek@adacore.com>
Date:   Fri May 28 14:54:01 2021 +0200

    [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:
---
 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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-09 12:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09 12:37 [gcc r12-2190] [Ada] Avoid unnecessary call in preanalysis without freezing Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).