Fix linker tests to compile with gcc-12.

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.
This commit is contained in:
Nick Clifton 2022-03-01 10:10:20 +00:00
parent 81c9e0f6c4
commit 95e96e052a
7 changed files with 16 additions and 6 deletions

View 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.

View 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

View 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

View 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)

View 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

View 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

View 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