This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/37882] New: [4.3/4.4 Regression] Bitfield miscompilation
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Oct 2008 12:28:56 -0000
- Subject: [Bug c/37882] New: [4.3/4.4 Regression] Bitfield miscompilation
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
struct S
{
int a : 21;
unsigned char b : 3;
} s;
int
main ()
{
s.b = 4;
if (s.b > 0 && s.b < 4)
__builtin_abort ();
return 0;
}
See http://gcc.gnu.org/ml/gcc-bugs/2008-10/msg01324.html
Works till 4.2, fails at -O with 4.3 and trunk.
--
Summary: [4.3/4.4 Regression] Bitfield miscompilation
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37882