]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: rename thread_local variables
authorLukas Durfina <lukas.durfina@gmail.com>
Tue, 4 Nov 2025 09:06:48 +0000 (10:06 +0100)
committerTom Tromey <tromey@adacore.com>
Fri, 7 Nov 2025 16:11:49 +0000 (09:11 -0700)
C standard gnu23 introduces a new keyword 'thread_local'.
So, this variables must be renamed to avoid build errors.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.threads/tls-nodebug-pie.c
gdb/testsuite/gdb.threads/tls-nodebug-pie.exp
gdb/testsuite/gdb.threads/tls-nodebug.c
gdb/testsuite/gdb.threads/tls-nodebug.exp

index c86a95aedc87285582125bc30b45f1b533d55587..1e2c8c296a05a163e1184a6395ce6fdc93e36a65 100644 (file)
@@ -17,7 +17,7 @@
 
 #include <pthread.h>
 
-__thread int thread_local = 42;
+__thread int thread_local_var = 42;
 
 int
 main (void)
index 44c12f5663d1bc109c7b9b03f66a7eab2072bf2c..87d682dda1b938bc6e71d6119d55752f76b3e2ef 100644 (file)
@@ -26,4 +26,4 @@ if {![runto_main]} {
 }
 
 # Formerly: Cannot access memory at address 0xffffef7c0698
-gdb_test "p (int) thread_local" " = 42" "thread local storage"
+gdb_test "p (int) thread_local_var" " = 42" "thread local storage"
index d3b31b7609c717cd1aaeb2f1576cfbe5e5551748..555980719c5d378683a5baaa2b5ed3eff406ca38 100644 (file)
@@ -2,7 +2,7 @@
 
 #include <pthread.h>
 
-__thread int thread_local = 42;
+__thread int thread_local_var = 42;
 
 int main(void)
 {
index 971f26c269ce19a69d4383f8fdd4168cfb688896..9d9fe1a38b65ea2fc045f6ea73f1c042e70363db 100644 (file)
@@ -32,9 +32,9 @@ if {![runto_main]} {
 }
 
 # Formerly: Cannot access memory at address 0x0
-gdb_test "p thread_local" "'thread_local' has unknown type; cast it to its declared type" \
+gdb_test "p thread_local_var" "'thread_local_var' has unknown type; cast it to its declared type" \
     "thread local storage, unknown type"
-gdb_test "p (int) thread_local" "= 42" \
+gdb_test "p (int) thread_local_var" "= 42" \
     "thread local storage, cast"
 
 # Done!