[Bug middle-end/12113] [tree-ssa] wrong result for comparison
steven at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun Sep 7 14:46:00 GMT 2003
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
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dnovillo at redhat dot com
------- Additional Comments From steven at gcc dot gnu dot org 2003-09-07 14:46 -------
Hmm weird,
If I compile this code,
int main (void)
{
char *s = "012345678901234567890123I567890";
printf ("%c\n", (char)(s[24] & 0x000000ff));
if ('I' == (char)(s[24] & 0x0ff))
return (0);
else
abort ();
}
then my .t02.optimized dump looks like this,
;; Function main (main)
;; enabled by -tree-original
{
char* s = ("012345678901234567890123I567890");
printf(("%c\n"), (*(s + 24) & '\xffffffff'));
if (0)
return <return-value> = 0;
else
abort();
}
Note the difference between the two printf lines.
Also weird that the first s[24] expr is not folded but the second is...
More information about the Gcc-bugs
mailing list