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

     1  /* PR tree-optimization/79737 */
     2  
     3  #if __SIZEOF_INT__ < 4
     4    __extension__ typedef __INT32_TYPE__ int32_t;
     5  #else
     6    typedef int int32_t;
     7  #endif
     8  
     9  #pragma pack(1)
    10  struct S
    11  {
    12    int32_t b:18;
    13    int32_t c:1;
    14    int32_t d:24;
    15    int32_t e:15;
    16    int32_t f:14;
    17  } i;
    18  int g, j, k;
    19  static struct S h;
    20  
    21  void
    22  foo ()
    23  {
    24    for (j = 0; j < 6; j++)
    25      k = 0;
    26    for (; k < 3; k++)
    27      {
    28        struct S m = { 5, 0, -5, 9, 5 };
    29        h = m;
    30        if (g)
    31  	i = m;
    32        h.e = 0;
    33      }
    34  }
    35  
    36  int
    37  main ()
    38  {
    39    foo ();
    40    if (h.e != 0)
    41      __builtin_abort ();
    42    return 0;
    43  }