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

     1  /* PR middle-end/52979 */
     2  /* { dg-require-effective-target int32plus } */
     3  
     4  extern void abort (void);
     5  int c, d, e;
     6  
     7  void
     8  foo (void)
     9  {
    10  }
    11  
    12  struct __attribute__((packed)) S { int g : 31; int h : 6; };
    13  static struct S b = { 1 };
    14  struct S a = { 1 };
    15  
    16  void
    17  bar (void)
    18  {
    19    a.h = 1;
    20    struct S f = { };
    21    b = f;
    22    e = 0;
    23    if (d)
    24      c = a.g;
    25  }
    26  
    27  void
    28  baz (void)
    29  {
    30    bar ();
    31    a = b;
    32  }
    33  
    34  int
    35  main ()
    36  {
    37    baz ();
    38    if (a.g)
    39      abort ();
    40    return 0;
    41  }