This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/32244] bit-field: optimization BUG
- 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: 25 Jan 2008 13:23:02 -0000
- Subject: [Bug middle-end/32244] bit-field: optimization BUG
- References: <bug-32244-10812@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from rguenth at gcc dot gnu dot org 2008-01-25 13:23 -------
Uh, all is broken ;)
1) we don't reduce shift or rotate results
2) we do wrong folding of rotates
3) we do wrong expansion of rotates
struct foo
{
unsigned long long b:40;
} x;
extern void abort (void);
void test1(unsigned long long res)
{
/* Build a rotate expression on a 40 bit argument. */
if ((x.b<<8) + (x.b>>32) != res)
abort ();
}
int main()
{
x.b = 0x0100000001;
test1(0x0000000101);
x.b = 0x0100000000;
test1(0x0000000001);
return 0;
}
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2007-06-08 10:28:26 |2008-01-25 13:23:02
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32244