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

     1  /* { dg-require-effective-target int32plus } */
     2  /* { dg-options "-fno-strict-overflow" } */
     3  
     4  extern void abort (void);
     5  extern void exit (int);
     6  
     7  __attribute__ ((noinline)) void
     8  foo(short unsigned int *p1, short unsigned int *p2)
     9  {
    10    short unsigned int x1, x4;
    11    int x2, x3, x5, x6;
    12    unsigned int x7;
    13    
    14    x1 = *p1;
    15    x2 = (int) x1;
    16    x3 = x2 * 65536;
    17    x4 = *p2;
    18    x5 = (int) x4;
    19    x6 = x3 + x4;
    20    x7 = (unsigned int) x6;
    21    if (x7 <= 268435455U)
    22      abort ();
    23    exit (0);
    24  }
    25  
    26  int
    27  main()
    28  {
    29    short unsigned int x, y;
    30    x = -5;
    31    y = -10;
    32    foo (&x, &y);
    33  }