1 #define __aligned(N)    __attribute__((aligned(N)))
   2 #define alignof(X)      __alignof__(X)
   3 
   4 struct s {
   5         short a, b, c;
   6 } __aligned(2*sizeof(short));
   7 
   8 static int fs(void) { return  sizeof(struct s); }
   9 static int fa(void) { return alignof(struct s); }
  10 
  11 void main(void)
  12 {
  13         _Static_assert( sizeof(struct s) == 4 * sizeof(short), "size");
  14         _Static_assert(alignof(struct s) == 2 * sizeof(short), "alignment");
  15 }
  16 
  17 /*
  18  * check-name: type-attribute-align
  19  */