1  /* { dg-do compile } */
       2  /* { dg-options "-O -frounding-math -fdump-tree-optimized-raw" } */
       3  
       4  // This assumes that long long is strictly larger than int
       5  
       6  #define DEF(num, T1, T2) T2 f##num(T1 x) { \
       7      T1 y = -x; \
       8      T2 z = (T2)y; \
       9      return -z; \
      10  }
      11  DEF(0, unsigned, long long)
      12  DEF(1, unsigned, unsigned long long)
      13  DEF(2, double, float)
      14  
      15  /* { dg-final { scan-tree-dump-times "negate_expr" 6 "optimized"} } */