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

     1  /* PR middle-end/57344 */
     2  /* { dg-require-effective-target int32plus } */
     3  
     4  struct __attribute__((packed)) S
     5  {
     6    int a : 27;
     7  #if __SIZEOF_INT__ * __CHAR_BIT__ >= 32
     8    int b : 22;
     9  #else
    10    int b : 13;
    11  #endif
    12    char c;
    13    int : 0;
    14  } s[2];
    15  int i;
    16  
    17  __attribute__((noinline, noclone)) void
    18  foo (int x)
    19  {
    20    if (x != -3161)
    21      __builtin_abort ();
    22    asm volatile ("" : : : "memory");
    23  }
    24  
    25  int
    26  main ()
    27  {
    28    struct S t = { 0, -3161L };
    29    s[1] = t;
    30    for (; i < 1; i++)
    31      foo (s[1].b);
    32    return 0;
    33  }