Self-explanatory. Tested on x86-64/Lnux, applied on mainline and 9 branch.
2019-05-23 Eric Botcazou <ebotca...@adacore.com>
* c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
--
Eric Botcazou
Index: c-ada-spec.c
===================================================================
--- c-ada-spec.c (revision 271457)
+++ c-ada-spec.c (working copy)
@@ -679,8 +679,10 @@ compare_node (const void *lp, const void
{
const_tree lhs = *((const tree *) lp);
const_tree rhs = *((const tree *) rp);
+ const int ret
+ = compare_location (decl_sloc (lhs, true), decl_sloc (rhs, true));
- return compare_location (decl_sloc (lhs, true), decl_sloc (rhs, true));
+ return ret ? ret : DECL_UID (lhs) - DECL_UID (rhs);
}
/* Compare two comments (LP and RP) by their source location. */