]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 23 May 2019 10:35:30 +0000 (10:35 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 23 May 2019 10:35:30 +0000 (10:35 +0000)
From-SVN: r271550

gcc/c-family/ChangeLog
gcc/c-family/c-ada-spec.c

index abdea1b9280fe5288ae5beb3f93702b48027ffd6..871464b8e555c53a6a80b053b56ebe8f6ded9537 100644 (file)
@@ -1,3 +1,7 @@
+2019-05-23  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
+
 2019-05-03  Release Manager
 
        * GCC 9.1.0 released.
index c85e6060d3e73c6b9982e72766c291bc2570bb8f..76e736964dee3fe33a25a8faa1dfbe0d23f58e48 100644 (file)
@@ -679,8 +679,10 @@ compare_node (const void *lp, const void *rp)
 {
   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.  */