binutils-gdb/ld/testsuite/ld-elf/pr21964-2b.c
Nick Clifton 95e96e052a 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.
2022-03-01 10:10:20 +00:00

13 lines
280 B
C

extern int __start___verbose[];
extern int __stop___verbose[];
int
foo2 (void)
{
static int my_var __attribute__((used, section("__verbose"))) = 10;
if (& __start___verbose[0] == & __stop___verbose[0]
|| __start___verbose[0] != 10)
return -1;
else
return 0;
}