This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/26729] [4.0,4.1 regression] bad bitops folding
- From: "falk at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Mar 2006 21:59:17 -0000
- Subject: [Bug middle-end/26729] [4.0,4.1 regression] bad bitops folding
- References: <bug-26729-4387@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #11 from falk at debian dot org 2006-03-28 21:59 -------
Ah. I can reproduce it now. Here is a C test case:
void abort(void);
__attribute__((noinline))
int f (unsigned short word) {
return (word & 0x1) && (((unsigned short) (word & 0x8000)) == 0x8000);
}
int main(void) {
if (!f(0x8001))
abort();
return 0;
}
--
falk at debian dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|c++ |middle-end
Ever Confirmed|0 |1
Keywords|diagnostic |wrong-code
Known to fail|3.4.3 3.3.3 4.0.2 4.1.0 |3.3.6 3.4.3 4.0.2 4.1.0
| |4.2.0
Known to work| |2.95.4
Summary|bogus 'comparison is always |[4.0,4.1 regression] bad
|0' message |bitops folding
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26729