summaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf/pr21964-1c.c
blob: 996a9e182f418ae06b84482b4292ed98323fa8dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <stdio.h>

extern int foo1 (void);
extern int foo2 (void);

extern int __start___verbose[];
extern int __stop___verbose[];
static int my_var __attribute__((used, section("__verbose"))) = 6;
int
bar (void)
{
  if (__start___verbose == __stop___verbose)
    return -1;

  if (__start___verbose[0] != 6)
    return -2;
  else
    return 0;
}

int
main ()
{
  if (bar () == 0
      && foo1 () == 0
      && foo2 () == 0)
    printf ("PASS\n");
  return 0;
}