(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
ipa/
vrp2.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-O2 -fdump-ipa-cp-details" } */
       3  
       4  static __attribute__((noinline, noclone))
       5  int foo (int i)
       6  {
       7    if (i < 4)
       8      __builtin_abort ();
       9    return 0;
      10  }
      11  
      12  static __attribute__((noinline, noclone))
      13  int bar (int j)
      14  {
      15    if (j > 8)
      16      return foo (j + 2);
      17    else if (j > 2)
      18      return foo (j + 3);
      19  
      20    return 0;
      21  }
      22  
      23  int main ()
      24  {
      25    foo (100);
      26    for (unsigned int i = 0; i < 12; ++i)
      27      {
      28        bar (i);
      29      }
      30    foo (4);
      31    return 0;
      32  }
      33  
      34  /* { dg-final { scan-ipa-dump "Setting value range of param 0 \\(now 0\\) \\\[4," "cp" } } */
      35  /* { dg-final { scan-ipa-dump "Setting value range of param 0 \\(now 0\\) \\\[0, 11\\\]" "cp" } } */