modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/compile/pr21021.c (about)

     1  /* PR tree-optimization/21021
     2  
     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.  */
     6  
     7  extern void *bar (void);
     8  
     9  int
    10  foo (unsigned int *p, unsigned int *q)
    11  {
    12    const void *r = bar ();
    13  
    14    if (r >= (const void *) *p
    15        && r < (const void *) *q)
    16      return 1;
    17  
    18    return 0;
    19  }