This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/32244] New: bit-field: optimization BUG
- From: "s__nakayama at infoseek dot jp" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Jun 2007 13:36:16 -0000
- Subject: [Bug c/32244] New: bit-field: optimization BUG
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The output is different by the optimization.
testcase:
#include <stdio.h>
struct foo
{
unsigned long long b:33;
};
int main()
{
struct foo x = {2};
printf("%llx\n",(x.b<<32));
return 0;
}
result:
$ gcc bit.c -o bit; ./bit
200000000
$ gcc -O bit.c -o bit; ./bit
0
--
Summary: bit-field: optimization BUG
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: s__nakayama at infoseek dot jp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32244