PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / pr21021.c
blobb748216307adc15be7edd520fac89609b02b8e78
1 /* PR tree-optimization/21021
3 The front end produces a comparison of mismatched types, namely an
4 integer and a pointer, causing VRP to compute TYPE_MAX_VALUE for a
5 pointer, which we cannot. */
7 extern void *bar (void);
9 int
10 foo (unsigned int *p, unsigned int *q)
12 const void *r = bar ();
14 if (r >= (const void *) *p
15 && r < (const void *) *q)
16 return 1;
18 return 0;