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

     1  /* PR middle-end/55750 */
     2  
     3  extern void abort (void);
     4  
     5  struct S
     6  {
     7    int m : 1;
     8    int n : 7;
     9  } arr[2];
    10  
    11  __attribute__((noinline, noclone)) void
    12  foo (unsigned i)
    13  {
    14    arr[i].n++;
    15  }
    16  
    17  int
    18  main ()
    19  {
    20    arr[0].m = -1;
    21    arr[0].n = (1 << 6) - 1;
    22    arr[1].m = 0;
    23    arr[1].n = -1;
    24    foo (0);
    25    foo (1);
    26    if (arr[0].m != -1 || arr[0].n != -(1 << 6) || arr[1].m != 0 || arr[1].n != 0)
    27      abort ();
    28    return 0;
    29  }