]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ada: Remove superfluous Relocate_Node calls
authorRonan Desplanques <desplanques@adacore.com>
Fri, 1 Mar 2024 11:54:58 +0000 (12:54 +0100)
committerMarc Poulhiès <poulhies@adacore.com>
Fri, 17 May 2024 08:20:58 +0000 (10:20 +0200)
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.

gcc/ada/exp_ch4.adb
gcc/ada/sem_attr.adb

index 448cd5c82b619549b7c9cd91e0b0271590de8f21..42d18f7777118e531f84d6a7c860a0c1c60c452d 100644 (file)
@@ -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;
index 629033ca5accc75e044256b3f9ec01bf32580a5a..a921909685a7cdcedd0ff2b90d7f0bb75475fd14 100644 (file)
@@ -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;