diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3e66a1d25694528fa5bcba0e3edf3c5114cf04c1..4f3bc5bcbf9a9fe8b63778e9a62439940fe16f2b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2015-07-13  Marek Polacek  <polacek@redhat.com>
+
+	* rtl.c (rtx_equal_p_cb): Fix typo.
+
 2015-07-13  Andrew MacLeod  <amacleod@redhat.com>
 
 	* omega.h: Don't include config.h, don't include params.h again if
diff --git a/gcc/rtl.c b/gcc/rtl.c
index dccf298563b6638b97263f6b292394d0d756c5d2..b1b485ed60fd29307346168977163c33781c2915 100644
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -441,7 +441,7 @@ rtx_equal_p_cb (const_rtx x, const_rtx y, rtx_equal_p_callback_function cb)
 
     case DEBUG_PARAMETER_REF:
       return DEBUG_PARAMETER_REF_DECL (x)
-	     == DEBUG_PARAMETER_REF_DECL (x);
+	     == DEBUG_PARAMETER_REF_DECL (y);
 
     case ENTRY_VALUE:
       return rtx_equal_p_cb (ENTRY_VALUE_EXP (x), ENTRY_VALUE_EXP (y), cb);