summaryrefslogtreecommitdiffstats
path: root/trunk/testsuite/reloc10.c
blob: 5720d334adc948840b8fed5370063b526ca6aed7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdlib.h>

extern int bar, baz, *barp, *bazp, dummy;
extern int f1 (void), f2 (void), f3 (void), f4 (void);
/* Try to use COPY reloc for bar and get away without COPY
   reloc for baz.  Similarly for barp and bazp.  */
int *bazp2 = &baz;
int **bazp3 = &bazp;

int main (void)
{
  if (f1 () != 11 || f2 () != 12 || bar != 36 || *bazp2 != 38)
    abort ();
  if (f3 () != 14 || f4 () != 16 || *barp != 36 || **bazp3 != 38)
    abort ();
  if (dummy != 24)
    abort ();
  exit (0);
}