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 lto/44812] m32 lto produces non-relocatable subtraction expression errors



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


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