(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
pr64454.c
       1  /* PR tree-optimization/64454 */
       2  /* { dg-do compile } */
       3  /* { dg-options "-O2 -fdump-tree-vrp1 -fno-ipa-icf" } */
       4  
       5  unsigned
       6  f1 (unsigned x)
       7  {
       8    return (x % 5) % 5;
       9  }
      10  
      11  int
      12  f2 (int x)
      13  {
      14    return (x % 5) % 5;
      15  }
      16  
      17  int
      18  f3 (int x)
      19  {
      20    return (x % -5) % -5;
      21  }
      22  
      23  unsigned
      24  f4 (unsigned x)
      25  {
      26    return (x % 5) % 6;
      27  }
      28  
      29  int
      30  f5 (int x)
      31  {
      32    return (x % 5) % 6;
      33  }
      34  
      35  int
      36  f6 (int x)
      37  {
      38    return (x % -5) % -6;
      39  }
      40  
      41  /* { dg-final { scan-tree-dump-times "% 5" 6 "vrp1" } } */
      42  /* { dg-final { scan-tree-dump-times "% 6" 0 "vrp1" } } */