(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
pr102207.c
       1  /* PR tree-optimization/102207 */
       2  /* { dg-do run { target int128 } } */
       3  /* { dg-options "-O2" } */
       4  
       5  typedef unsigned __int128 u128;
       6  
       7  u128
       8  foo (unsigned short a)
       9  {
      10    u128 g;
      11    __builtin_sub_overflow ((unsigned long long) -a, 1, &g);
      12    return g;
      13  }
      14  
      15  int
      16  main ()
      17  {
      18    if (__SIZEOF_LONG_LONG__ * __CHAR_BIT__ != 64
      19        || __SIZEOF_SHORT__ * __CHAR_BIT__ != 16)
      20      return 0;
      21    if (foo (1) != 0xfffffffffffffffeULL)
      22      __builtin_abort ();
      23    return 0;
      24  }