[Bug tree-optimization/39870] VRP can't see through cast to unsigned
ebotcazou at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Apr 24 16:15:00 GMT 2009
------- Comment #12 from ebotcazou at gcc dot gnu dot org 2009-04-24 16:15 -------
> The folded a >= C1 && a <= C2 case is correctly handled by VRP btw (I added
> that long time ago).
eric@atlantis:~/build/gcc/native32> cat t.c
extern void link_failure (void);
static int __attribute__ ((noinline)) foo (int x)
{
if (x >= 1)
if (x <= 10)
{
if (x < 1 || x > 10)
link_failure ();
x = x + 1;
}
return x;
}
int main (void)
{
int i = foo (0);
return 0;
}
eric@atlantis:~/build/gcc/native32> gcc/xgcc -Bgcc -o t t.c -O2
/tmp/ccMEXYFN.o: In function `foo':
t.c:(.text+0x24): undefined reference to `link_failure'
collect2: ld returned 1 exit status
eric@atlantis:~/build/gcc/native32>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39870
More information about the Gcc-bugs
mailing list