154359Sroberto/* PR tree-optimization/21021
2182007Sroberto
3285612Sdelphij   The front end produces a comparison of mismatched types, namely an
4182007Sroberto   integer and a pointer, causing VRP to compute TYPE_MAX_VALUE for a
554359Sroberto   pointer, which we cannot.  */
654359Sroberto
754359Srobertoextern void *bar (void);
8285612Sdelphij
9285612Sdelphijint
1054359Srobertofoo (unsigned int *p, unsigned int *q)
11182007Sroberto{
12182007Sroberto  const void *r = bar ();
13182007Sroberto
14182007Sroberto  if (r >= (const void *) *p
15182007Sroberto      && r < (const void *) *q)
16182007Sroberto    return 1;
17182007Sroberto
18182007Sroberto  return 0;
19182007Sroberto}
20182007Sroberto