This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/44812] m32 lto produces non-relocatable subtraction expression errors
- From: "hubicka at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Aug 2010 13:44:34 -0000
- Subject: [Bug lto/44812] m32 lto produces non-relocatable subtraction expression errors
- References: <bug-44812-11113@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from hubicka at gcc dot gnu dot org 2010-08-24 13:44 -------
the following testcase:
__attribute__((visibility ("hidden"))) extern int mumble;
extern void abort (void);
extern void exit (int);
int
main ()
{
if (++mumble != 42)
abort ();
exit (0);
}
should compile to pretty much the same as the partition. We get:
call ___i686.get_pc_thunk.bx
L00000000001$pb:
subl $24, %esp
LCFI1:
movl L_mumble$non_lazy_ptr-L00000000001$pb(%ebx), %edx
movl (%edx), %eax
addl $1, %eax
cmpl $42, %eax
movl %eax, (%edx)
je L2
call _abort
and later
L_mumble$non_lazy_ptr:
.long _mumble
while in the partitoin we get:
CFI1:
movl _mumble-L00000000001$pb(%ebx), %eax
addl $1, %eax
cmpl $42, %eax
movl %eax, _mumble-L00000000001$pb(%ebx)
je L2
call _abort
L2:
movl $0, (%esp)
call _exit
LFE0:
and no later mention of it...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44812