diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2004-07-21 02:35:55 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2004-07-20 19:35:55 -0700 |
commit | 7448a4d2a2320ef30c5bb16771719dae87982b5b (patch) | |
tree | 5a8fee02f3dd3a543caaf2a9c4a95b038caecc8c /gcc/testsuite | |
parent | 7ea7e0584d529d634065871f1ed7c4b25581ea17 (diff) | |
download | gcc-7448a4d2a2320ef30c5bb16771719dae87982b5b.zip gcc-7448a4d2a2320ef30c5bb16771719dae87982b5b.tar.gz gcc-7448a4d2a2320ef30c5bb16771719dae87982b5b.tar.bz2 |
re PR target/16559 (Incorrect code generated for function pointer)
2004-07-20 H.J. Lu <hongjiu.lu@intel.com>
PR target/16559
* gcc.dg/ia64-fptr-1.c: New file.
From-SVN: r84995
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/ia64-fptr-1.c | 37 |
2 files changed, 42 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index eb1a341..424bfd8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-07-20 H.J. Lu <hongjiu.lu@intel.com> + + PR target/16559 + * gcc.dg/ia64-fptr-1.c: New file. + 2004-07-21 Giovanni Bajo <giovannibajo@gcc.gnu.org> PR c++/14497 diff --git a/gcc/testsuite/gcc.dg/ia64-fptr-1.c b/gcc/testsuite/gcc.dg/ia64-fptr-1.c new file mode 100644 index 0000000..bb11066 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ia64-fptr-1.c @@ -0,0 +1,37 @@ +/* { dg-do run { target ia64-*-* } } */ +/* { dg-options "-O2" } */ + +/* Test function descriptor access. */ + +extern unsigned long *_GLOBAL_OFFSET_TABLE_; +extern void abort(void); + +struct ia64_fdesc +{ + unsigned long func; + unsigned long gp; +}; + +void +os_boot_rendez (void) +{ +} + +static int +check (unsigned long gp) +{ + return gp != (unsigned long) &_GLOBAL_OFFSET_TABLE_; +} + +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); + if (res) + abort (); + return res; +} |