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


gcc version 4.0.4
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/var/tmp

compiling with "-O" on input:

void
foo(unsigned long long c)
{
        if (c & 0x80000000)
                puts("bug");
}

int
main(void)
{
        foo(0x100000000ULL);
        return 0;
}

produces "bug". Without "-O", it does not.


-- 
           Summary: long long optimization problem
           Product: gcc
           Version: 4.0.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gr at collax dot com


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]