[binutils-gdb/binutils-2_45-branch] libiberty: sync with gcc

Matthieu Longo mlongo@sourceware.org
Thu Aug 7 09:37:36 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d45e8bff0b4279009f7962ce6e65795f34133c46

commit d45e8bff0b4279009f7962ce6e65795f34133c46
Author: Matthieu Longo <matthieu.longo@arm.com>
Date:   Mon Aug 4 11:04:13 2025 +0100

    libiberty: sync with gcc
    
    Import the following commits from GCC as of r16-3056-gca2169c65bd169:
            0d0837df697 libiberty: disable logging of list content for doubly-linked list tests

Diff:
---
 libiberty/ChangeLog                           | 11 +++++++++++
 libiberty/testsuite/test-doubly-linked-list.c | 13 ++++++++++---
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 2ae5626ed2e..b072d0bed52 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,14 @@
+2025-08-06  Matthieu Longo  <matthieu.longo@arm.com>
+
+	* testsuite/test-doubly-linked-list.c: disable debug logging on
+	stdout.
+
+2025-07-09  Matthieu Longo  <matthieu.longo@arm.com>
+
+	* Makefile.in: Add new header.
+	* testsuite/Makefile.in: Add new test.
+	* testsuite/test-doubly-linked-list.c: New test.
+
 2025-05-13  Andreas Schwab  <schwab@suse.de>
 
 	* regex.c (regex_compile): Don't write beyond array bounds when
diff --git a/libiberty/testsuite/test-doubly-linked-list.c b/libiberty/testsuite/test-doubly-linked-list.c
index 1e1fc637653..93fe19a27ae 100644
--- a/libiberty/testsuite/test-doubly-linked-list.c
+++ b/libiberty/testsuite/test-doubly-linked-list.c
@@ -155,19 +155,26 @@ bool check(const char *op,
   bool success = true;
   bool res;
 
-  l_print (wrapper->first);
+#define DUMP_LIST 0
+
+  if (DUMP_LIST)
+    l_print (wrapper->first);
+
   res = run_test (expect, wrapper, false);
   printf ("%s: test-linked-list::%s: check forward conformity\n",
 	  res ? "PASS": "FAIL", op);
   success &= res;
 
-  l_reverse_print (wrapper->last);
+  if (DUMP_LIST)
+    l_reverse_print (wrapper->last);
+
   res = run_test (expect, wrapper, true);
   printf ("%s: test-linked-list::%s: check backward conformity\n",
 	  res ? "PASS": "FAIL", op);
   success &= res;
 
-  printf("\n");
+  if (DUMP_LIST)
+    printf("\n");
 
   return success;
 }


More information about the Binutils-cvs mailing list