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/31363] long long optimization problem



------- Comment #2 from gr at collax dot com  2007-03-26 19:03 -------
(In reply to comment #1)
> Works for me.

Hm. Just to be completely sure, my source archive gcc-4.0.4.tar.bz2 has md5sum
8970debbc55bea85ee80961d733080f0, as two other copies fetched from different
mirrors. I compiled it on two different i386 Linux distributions, getting the
same result in both cases.

The generated assembler code in question is

foo:
        pushl   %ebp
        movl    %esp, %ebp
        subl    $8, %esp
        movl    8(%ebp), %eax
        movl    12(%ebp), %edx
        andl    $-2147483648, %eax
        movl    %edx, %ecx
        orl     %eax, %ecx
        je      .L4
        movl    $.LC0, (%esp)
        call    puts
.L4:
        leave
        ret

If I understand this correctly, the upper half of the long long, in %edx,
remains unaltered but is ORed into the value that is finally tested.

What conditions could have lead to different results here?


-- 


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


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