From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1914) id 2232139890B1; Fri, 9 Jul 2021 12:37:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2232139890B1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Pierre-Marie de Rodat To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-2193] [Ada] Avoid repeated calls in analysis of expression functions X-Act-Checkin: gcc X-Git-Author: Piotr Trojanek X-Git-Refname: refs/heads/master X-Git-Oldrev: 8bab88ba7bec025ef9db7ed5cb8d525fceab8636 X-Git-Newrev: 8a13a0017e52979c4b55f4c6294f4794882a9ce7 Message-Id: <20210709123757.2232139890B1@sourceware.org> Date: Fri, 9 Jul 2021 12:37:57 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2021 12:37:57 -0000 https://gcc.gnu.org/g:8a13a0017e52979c4b55f4c6294f4794882a9ce7 commit r12-2193-g8a13a0017e52979c4b55f4c6294f4794882a9ce7 Author: Piotr Trojanek Date: Fri May 28 14:53:21 2021 +0200 [Ada] Avoid repeated calls in analysis of expression functions gcc/ada/ * sem_ch6.adb (Analyze_Expression_Function): Use Orig_N variable instead of repeated calls to Original_Node. Diff: --- gcc/ada/sem_ch6.adb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb index 6bc72d65bf6..ed76808ec76 100644 --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_ch6.adb @@ -561,7 +561,7 @@ package body Sem_Ch6 is Push_Scope (Def_Id); Install_Formals (Def_Id); Preanalyze_Formal_Expression (Expr, Typ); - Check_Limited_Return (Original_Node (N), Expr, Typ); + Check_Limited_Return (Orig_N, Expr, Typ); End_Scope; end if; @@ -630,7 +630,7 @@ package body Sem_Ch6 is Check_Dynamically_Tagged_Expression (Expr => Expr, Typ => Etype (Def_Id), - Related_Nod => Original_Node (N)); + Related_Nod => Orig_N); end if; -- We must enforce checks for unreferenced formals in our newly