modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/execute/cvt-1.c (about)

     1  static inline long
     2  g1 (double x)
     3  {
     4    return (double) (long) x;
     5  }
     6  
     7  long
     8  g2 (double f)
     9  {
    10    return f;
    11  }
    12  
    13  double
    14  f (long i)
    15  {
    16    if (g1 (i) != g2 (i))
    17      abort ();
    18    return g2 (i);
    19  }
    20  
    21  main ()
    22  {
    23    if (f (123456789L) != 123456789L)
    24      abort ();
    25    if (f (123456789L) != g2 (123456789L))
    26      abort ();
    27    exit (0);
    28  }