(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
pr51408.c
       1  /* This testcase used to fail because of a bug in 
       2     arm.md:*minmax_arithsi.  */
       3  
       4  /* { dg-do run } */
       5  /* { dg-options "-O1" } */
       6  
       7  extern void abort (void);
       8  
       9  int __attribute__((noinline))
      10  foo (int a, int b)
      11  {
      12    int max = (b > 0) ? b : 0;
      13    return max - a;
      14  }
      15  
      16  int
      17  main (void)
      18  {
      19    if (foo (3, -1) != -3)
      20      abort ();
      21    return 0;
      22  }