Commit 2b8235ea by Eric Botcazou Committed by Eric Botcazou

* c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.

From-SVN: r271549
parent 832ece86
2019-05-23 Eric Botcazou <ebotcazou@adacore.com>
* c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
2019-05-22 Martin Liska <mliska@suse.cz> 2019-05-22 Martin Liska <mliska@suse.cz>
PR lto/90500 PR lto/90500
......
...@@ -679,8 +679,10 @@ compare_node (const void *lp, const void *rp) ...@@ -679,8 +679,10 @@ compare_node (const void *lp, const void *rp)
{ {
const_tree lhs = *((const tree *) lp); const_tree lhs = *((const tree *) lp);
const_tree rhs = *((const tree *) rp); 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. */ /* Compare two comments (LP and RP) by their source location. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment