From: Ronan Desplanques Date: Fri, 1 Mar 2024 11:54:58 +0000 (+0100) Subject: ada: Remove superfluous Relocate_Node calls X-Git-Tag: basepoints/gcc-16~8964 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4db82bfb3a178e861dc9a07596fefcd812da6614;p=thirdparty%2Fgcc.git 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 --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 448cd5c82b6..42d18f77771 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 629033ca5ac..a921909685a 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;