http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49039
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-18
16:55:20 UTC ---
Shorter testcase:
/* PR tree-optimization/49039 */
extern void abort (void);
int cnt;
__attribute__((noinline, noclone)) void
foo (unsigned int x, unsigned int y)
{
unsigned int minv, maxv;
if (x == 0 || y == -1U)
return;
minv = x < y ? x : y;
maxv = x > y ? x : y;
if (minv == 0)
++cnt;
if (maxv == -1U)
++cnt;
}
int
main ()
{
foo (-1U, 0);
if (cnt != 2)
abort ();
return 0;
}