summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/ia64/fptr-1.c
blob: b3d4536bf97231089bf6d2f53cf85a54bb1e7846 (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
30
31
/* { dg-do compile { target ia64-*-linux* } } */
/* { dg-options "-O2" } */

/* { dg-final { scan-assembler-not "@ltoffx\\(os_boot_rendez#\\)" } } */
/* { dg-final { scan-assembler "@ltoff\\(@fptr\\(os_boot_rendez#\\)\\)" } } */

/* Test function descriptor access.  */

struct ia64_fdesc
{
  unsigned long func;
  unsigned long gp;
};

void
os_boot_rendez (void)
{
}

extern int check (unsigned long);

int
main (int argc, char **argv)
{
  int i;
  int res = 0;

  for (i = 0; i < 1; i++)
    res += check (((struct ia64_fdesc *) os_boot_rendez)->gp);
  return res;
}