https://gcc.gnu.org/g:4db82bfb3a178e861dc9a07596fefcd812da6614

commit r15-589-g4db82bfb3a178e861dc9a07596fefcd812da6614
Author: Ronan Desplanques <desplanq...@adacore.com>
Date:   Fri Mar 1 12:54:58 2024 +0100

    ada: Remove superfluous Relocate_Node calls
    
    This patch removes two calls to Relocate_Node that were not needed.
    This does not affect the behavior of the compiler.
    
    gcc/ada/
    
            * exp_ch4.adb (Expand_N_Case_Expression): Remove call to
            Relocate_Node.
            * sem_attr.adb (Analyze_Attribute): Likewise.

Diff:
---
 gcc/ada/exp_ch4.adb  | 2 +-
 gcc/ada/sem_attr.adb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb
index 448cd5c82b61..42d18f777711 100644
--- a/gcc/ada/exp_ch4.adb
+++ b/gcc/ada/exp_ch4.adb
@@ -5109,7 +5109,7 @@ package body Exp_Ch4 is
                   else
                      Alt_Expr :=
                        Make_Attribute_Reference (Alt_Loc,
-                         Prefix         => Relocate_Node (Alt_Expr),
+                         Prefix         => Alt_Expr,
                          Attribute_Name => Name_Unrestricted_Access);
                   end if;
                end if;
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 629033ca5acc..a921909685a7 100644
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -3425,7 +3425,7 @@ package body Sem_Attr is
       --  perform legality checks on the original tree.
 
       if Nkind (P) in N_Raise_xxx_Error then
-         Rewrite (N, Relocate_Node (P));
+         Rewrite (N, P);
          P := Original_Node (P_Old);
       end if;

Reply via email to