http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45831
Summary: 0 = 10 (with -O0, 0 = 0 with -O1, but 10 = 10
expected)
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: [email protected]
ReportedBy: [email protected]
gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#include <stdio.h>
main () {
int ten = 10;
printf ("%d = %d\n", 10 << -32, ten << -32);
return 0;
}