This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/16559] Incorrect code generated for function pointer
- From: "hjl at lucon dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Jul 2004 07:07:48 -0000
- Subject: [Bug target/16559] Incorrect code generated for function pointer
- References: <20040715070433.16559.hjl@lucon.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From hjl at lucon dot org 2004-07-15 07:07 -------
Created an attachment (id=6750)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6750&action=view)
A testcase
[hjl@gnu-4 fptr]$ make
gcc -g -O2 -c -o simple.o simple.c
gcc -o simple simple.o
./simple
GP: 0x84000880100000
nm simple | grep _GLOBAL_OFFSET_TABLE_
6000000000000cd8 G _GLOBAL_OFFSET_TABLE_
GP should be the same as _GLOBAL_OFFSET_TABLE_. If I change
for (i = 0; i < 1; i++)
printf ("GP: 0x%lx\n", FDESC_GP(os_boot_rendez));
to
printf ("GP: 0x%lx\n", FDESC_GP(os_boot_rendez));
it works OK.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16559