This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/43323] [4.4 Regression] Wrong code with bitfields and type casting.
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Mar 2010 15:55:17 -0000
- Subject: [Bug middle-end/43323] [4.4 Regression] Wrong code with bitfields and type casting.
- References: <bug-43323-18900@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from rguenth at gcc dot gnu dot org 2010-03-10 15:55 -------
Confirmed.
extern void abort (void);
int main()
{
struct { unsigned bar:1; } foo;
foo.bar = 0x1;
if ((unsigned char)(foo.bar * 0xfe) != 0xfeu)
abort ();
if ((unsigned char)(foo.bar * 0xff) != 0xffu)
abort ();
return 0;
}
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |wrong-code
Known to fail| |4.4.0 4.4.3
Known to work| |4.3.4 4.5.0
Last reconfirmed|0000-00-00 00:00:00 |2010-03-10 15:55:16
date| |
Summary|Wrong code with bitfields |[4.4 Regression] Wrong code
|and type casting. |with bitfields and type
| |casting.
Target Milestone|--- |4.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43323