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

     1  /* { dg-require-effective-target alloca } */
     2  /* This used to fail on SPARC with an unaligned memory access.  */
     3  
     4  void foo(int n)
     5  {
     6    struct S {
     7      int i[n];
     8      unsigned int b:1;
     9      int i2;
    10    } __attribute__ ((packed)) __attribute__ ((aligned (4)));
    11  
    12    struct S s;
    13  
    14    s.i2 = 0;
    15  }
    16  
    17  int main(void)
    18  {
    19    foo(4);
    20    
    21    return 0;
    22  }