OSDN Git Service

Index: gcc/ChangeLog
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / ia64-fptr-1.c
1 /* { dg-do run { target ia64-*-* } } */
2 /* { dg-options "-O2" } */
3
4 /* Test function descriptor access.  */
5
6 extern unsigned long *_GLOBAL_OFFSET_TABLE_;
7 extern void abort(void);
8
9 struct ia64_fdesc
10 {
11   unsigned long func;
12   unsigned long gp;
13 };
14
15 void
16 os_boot_rendez (void)
17 {
18 }
19
20 static int
21 check (unsigned long gp)
22 {
23   return gp != (unsigned long) &_GLOBAL_OFFSET_TABLE_;
24 }
25
26 int
27 main (int argc, char **argv)
28 {
29   int i;
30   int res = 0;
31
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;
37 }