Fix linker tests to compile with gcc-12.
authorNick Clifton <nickc@redhat.com>
Tue, 1 Mar 2022 10:10:20 +0000 (10:10 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 1 Mar 2022 10:10:20 +0000 (10:10 +0000)
PR 21964
* testsuite/ld-elf/pr21964-1a.c: Fix array comparisons.
* testsuite/ld-elf/pr21964-1b.c: Likewise.
* testsuite/ld-elf/pr21964-1c.c: Likewise.
* testsuite/ld-elf/pr21964-2a.c: Likewise.
* testsuite/ld-elf/pr21964-2b.c: Likewise.
* testsuite/ld-elf/pr21964-3a.c: Likewise.

ld/ChangeLog
ld/testsuite/ld-elf/pr21964-1a.c
ld/testsuite/ld-elf/pr21964-1b.c
ld/testsuite/ld-elf/pr21964-1c.c
ld/testsuite/ld-elf/pr21964-2a.c
ld/testsuite/ld-elf/pr21964-2b.c
ld/testsuite/ld-elf/pr21964-3a.c

index 3fea7995481afd926d86c120345952c480a1bd34..7fb9f5d20b1a679c0ce9ca83aa63ea37cb7d993c 100644 (file)
@@ -1,3 +1,13 @@
+2022-03-01  Nick Clifton  <nickc@redhat.com>
+
+       PR 21964
+       * testsuite/ld-elf/pr21964-1a.c: Fix array comparisons.
+       * testsuite/ld-elf/pr21964-1b.c: Likewise.
+       * testsuite/ld-elf/pr21964-1c.c: Likewise.
+       * testsuite/ld-elf/pr21964-2a.c: Likewise.
+       * testsuite/ld-elf/pr21964-2b.c: Likewise.
+       * testsuite/ld-elf/pr21964-3a.c: Likewise.
+
 2022-02-17  Roland McGrath  <mcgrathr@google.com>
 
        * ld.texi (Output Section Type): Fix typo in @code syntax.
index 680bda4dbfe54c07d12eac08beb1a84e23e05cf1..a060162ddad53f6877f87171e4509934f91764e9 100644 (file)
@@ -4,7 +4,7 @@ int
 foo1 (void)
 {
   static int my_var __attribute__((used, section("__verbose"))) = 5;
-  if (__start___verbose == __stop___verbose
+  if (& __start___verbose[0] == & __stop___verbose[0]
       || __start___verbose[0] != 5)
     return -1;
   else
index 1507b2280886ca2f1fe653cce15603d6743faf0f..688bbeb68702b39794998a897454eafc0c34d639 100644 (file)
@@ -4,7 +4,7 @@ int
 foo2 (void)
 {
   static int my_var __attribute__((used, section("__verbose"))) = 10;
-  if (__start___verbose == __stop___verbose
+  if (& __start___verbose[0] == & __stop___verbose[0]
       || __start___verbose[0] != 10)
     return -1;
   else
index 996a9e182f418ae06b84482b4292ed98323fa8dc..58322bcc227b6b3ab29d84f2afd0ecf0b3f091c6 100644 (file)
@@ -9,7 +9,7 @@ static int my_var __attribute__((used, section("__verbose"))) = 6;
 int
 bar (void)
 {
-  if (__start___verbose == __stop___verbose)
+  if (& __start___verbose[0] == & __stop___verbose[0])
     return -1;
 
   if (__start___verbose[0] != 6)
index 6331ff063b9247c994e57cc53f215fa9595088e0..8b1afca2acc71585d3eccf8cad188aa7ef953079 100644 (file)
@@ -4,7 +4,7 @@ int
 foo1 (void)
 {
   static int my_var __attribute__((used, section("__verbose"))) = 5;
-  if (__start___verbose == __stop___verbose
+  if (& __start___verbose[0] == & __stop___verbose[0]
       && __start___verbose[0] != 5)
     return -1;
   else
index 1507b2280886ca2f1fe653cce15603d6743faf0f..688bbeb68702b39794998a897454eafc0c34d639 100644 (file)
@@ -4,7 +4,7 @@ int
 foo2 (void)
 {
   static int my_var __attribute__((used, section("__verbose"))) = 10;
-  if (__start___verbose == __stop___verbose
+  if (& __start___verbose[0] == & __stop___verbose[0]
       || __start___verbose[0] != 10)
     return -1;
   else
index 835040ee3425f8738c936e8d90e5256ed928c96b..89f7b8835737faa7084ae9601d8813a868afe5d5 100644 (file)
@@ -3,7 +3,7 @@ extern int __stop___verbose[];
 int
 foo3 (void)
 {
-  if (__start___verbose == __stop___verbose
+  if (& __start___verbose[0] == & __stop___verbose[0]
       || __start___verbose[0] != 6)
     return -1;
   else