This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/12113] [tree-ssa] wrong result for comparison
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Sep 2003 15:55:16 -0000
- Subject: [Bug middle-end/12113] [tree-ssa] wrong result for comparison
- References: <20030831004855.12113.eyal@eyal.emu.id.au>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12113
------- Additional Comments From steven at gcc dot gnu dot org 2003-09-07 15:55 -------
After a mini-merge for fold-const.c from mainline, I get:
;; Function main (main)
;; enabled by -tree-original
{
char* s = ("012345678901234567890123I567890");
printf(("%c\n"), (*(s + 24) & '\xffffffff'));
if ((*(s + 24) & '\xffffffff') == 'I')
return <return-value> = 0;
else
abort();
}
This still looks funny to me, but at least it works. Why can't we deduce that
s[24] == 'I' and why do we change '0x0ff' to '0xffffffff'???