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