aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/ia64/fptr-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/ia64/fptr-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/ia64/fptr-1.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/ia64/fptr-1.c b/gcc-4.9/gcc/testsuite/gcc.target/ia64/fptr-1.c
new file mode 100644
index 000000000..b3d4536bf
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/ia64/fptr-1.c
@@ -0,0 +1,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;
+}