This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/16559] Incorrect code generated for function pointer


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]