This commit was manufactured by cvs2svn to create branch
[official-gcc.git] / gcc / testsuite / gcc.dg / ia64-fptr-1.c
blobbb110664bc1e864e70d579fbdde0b6de628113d4
1 /* { dg-do run { target ia64-*-* } } */
2 /* { dg-options "-O2" } */
4 /* Test function descriptor access. */
6 extern unsigned long *_GLOBAL_OFFSET_TABLE_;
7 extern void abort(void);
9 struct ia64_fdesc
11 unsigned long func;
12 unsigned long gp;
15 void
16 os_boot_rendez (void)
20 static int
21 check (unsigned long gp)
23 return gp != (unsigned long) &_GLOBAL_OFFSET_TABLE_;
26 int
27 main (int argc, char **argv)
29 int i;
30 int res = 0;
32 for (i = 0; i < 1; i++)
33 res += check (((struct ia64_fdesc *) os_boot_rendez)->gp);
34 if (res)
35 abort ();
36 return res;