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 middle-end/51784] [4.7 Regression] FAIL: gcc.dg/tree-prof/pr44777.c execution, -fprofile-generate -D_PROFILE_GENERATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51784

--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-14 00:38:18 UTC ---
Sounds like i?86-darwin target bug.  The %ebx value is wrong, should be 0x2929
instead (i.e. the point after call __x86.get_pc_thunk.bx in x, but most
probably is the point after call __x86.get_pc_thunk.bx in y instead.
Seems on Darwin %ebx (or whatever the PIC register is) contains the address
after the call to the get_pc_thunk, and thus each function has it different and
therefore non-local goto on i?86-darwin must restore %ebx, but clearly it
doesn't.
On i?86-linux this bug doesn't exist, because %ebx there is the address of
_GLOBAL_OFFSET_TABLE_ - nonlocal goto is only possible within the same CU and
thus will have the same _GOT_ value, so nothing needs to be restored. 
Similarly on x86_64-linux, where there is no PIC pointer, but %rip addressing
is used.
Doesn't look like a regression to me though, if the above is the case, then
probably darwin never supported nonlocal gotos in pic code (which is the
default there).


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