diff --git a/gcc/cfgrtl.cc b/gcc/cfgrtl.cc
index 567575176a3448a7c19314947112b5b73ee20cab..74ea14efc61539495449c1ddb499d804ca8cb763 100644
--- a/gcc/cfgrtl.cc
+++ b/gcc/cfgrtl.cc
@@ -4090,7 +4090,7 @@ fixup_reorder_chain (void)
 		     && (!NONDEBUG_INSN_P (insn) || !INSN_HAS_LOCATION (insn)))
 		insn = PREV_INSN (insn);
 	      if (insn != end
-		  && INSN_LOCATION (insn) == e->goto_locus)
+		  && loc_equal (INSN_LOCATION (insn), e->goto_locus))
 		continue;
 	      if (simplejump_p (BB_END (e->src))
 		  && !INSN_HAS_LOCATION (BB_END (e->src)))
@@ -4112,7 +4112,7 @@ fixup_reorder_chain (void)
 		  while (insn != end && !NONDEBUG_INSN_P (insn))
 		    insn = NEXT_INSN (insn);
 		  if (insn != end && INSN_HAS_LOCATION (insn)
-		      && INSN_LOCATION (insn) == e->goto_locus)
+		      && loc_equal (INSN_LOCATION (insn), e->goto_locus))
 		    continue;
 		}
 	      nb = split_edge (e);