(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.c-torture/
execute/
pr25125.c
       1  extern void exit (int);
       2  extern void abort (void);
       3  extern unsigned short f (short a) __attribute__((__noinline__));
       4  
       5  unsigned short
       6  f (short a)
       7  {
       8    short b;
       9  
      10    if (a > 0)
      11      return 0;
      12    b = ((int) a) + - (int) 32768;
      13    return b;
      14  }
      15  
      16  int
      17  main (void)
      18  {
      19    if (sizeof (short) < 2
      20        || sizeof (short) >= sizeof (int))
      21      exit (0);
      22  
      23    if (f (-32767) != 1)
      24      abort ();
      25  
      26    exit (0);
      27  }