[Ada] Remove superfluous call to Original_Node

Message ID 20220517082733.GA1088339@adacore.com
State Committed
Commit 87a655842470b3f764f6809206d1236227c315d3
Headers
Series [Ada] Remove superfluous call to Original_Node |

Commit Message

Pierre-Marie de Rodat May 17, 2022, 8:27 a.m. UTC
  The function Same_Object starts by taking the Original_Node of its
arguments.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* sem_ch5.adb (Analyze_Assignment): Remove superfluous call to
	Original_Node.
  

Patch

diff --git a/gcc/ada/sem_ch5.adb b/gcc/ada/sem_ch5.adb
--- a/gcc/ada/sem_ch5.adb
+++ b/gcc/ada/sem_ch5.adb
@@ -1111,7 +1111,7 @@  package body Sem_Ch5 is
 
          --  Where the object is the same on both sides
 
-         and then Same_Object (Lhs, Original_Node (Rhs))
+         and then Same_Object (Lhs, Rhs)
 
          --  But exclude the case where the right side was an operation that
          --  got rewritten (e.g. JUNK + K, where K was known to be zero). We