From: Ronan Desplanques <desplanq...@adacore.com> 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. Tested on x86_64-pc-linux-gnu, committed on master. --- 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 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; -- 2.43.2