(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
pr107967-3.c
       1  /* PR tree-optimization/107967 */
       2  /* { dg-do compile { target float64 } } */
       3  /* { dg-options "-O2 -fno-rounding-math -fno-trapping-math -fdump-tree-optimized" } */
       4  /* { dg-add-options float64 } */
       5  /* { dg-final { scan-tree-dump-times "return\[ \t]\*-?Inf;" 3 "optimized" } } */
       6  
       7  _Float64
       8  foo (_Float64 x)
       9  {
      10    if (x >= 1.0e+300f64)
      11      ;
      12    else
      13      __builtin_unreachable ();
      14    return x * x;
      15  }
      16  
      17  _Float64
      18  bar (_Float64 x)
      19  {
      20    if (x >= 1.0e+300f64)
      21      ;
      22    else
      23      __builtin_unreachable ();
      24    return x * -x;
      25  }
      26  
      27  _Float64
      28  baz (_Float64 a, _Float64 b)
      29  {
      30    if (a >= 0x1.fffffffffffffp+1023f64)
      31      ;
      32    else
      33      __builtin_unreachable ();
      34    if (b >= 0x1.p+972f64)
      35      ;
      36    else
      37      __builtin_unreachable ();
      38    return a + b;
      39  }
      40  
      41  _Float64
      42  qux (_Float64 a, _Float64 b)
      43  {
      44    if (a >= 0x1.fffffffffffffp+1023f64)
      45      ;
      46    else
      47      __builtin_unreachable ();
      48    if (b >= 0x1.fffffffffffffp+969f64)
      49      ;
      50    else
      51      __builtin_unreachable ();
      52    return a + b;
      53  }