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

     1  /* PR target/71554 */
     2  
     3  int v;
     4  
     5  __attribute__ ((noinline, noclone)) void
     6  bar (void)
     7  {
     8    v++;
     9  }
    10  
    11  __attribute__ ((noinline, noclone))
    12  void
    13  foo (unsigned int x)
    14  {
    15    signed int y = ((-__INT_MAX__ - 1) / 2);
    16    signed int r;
    17    if (__builtin_mul_overflow (x, y, &r))
    18      bar ();
    19  }
    20  
    21  int
    22  main ()
    23  {
    24    foo (2);
    25    if (v)
    26      __builtin_abort ();
    27    return 0;
    28  }