1  #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
       2  #define REVERSE_SSO __attribute__((scalar_storage_order("big-endian")));
       3  #else
       4  #define REVERSE_SSO __attribute__((scalar_storage_order("little-endian")));
       5  #endif
       6  
       7  struct S {
       8    short int i : 12;
       9    char c1 : 1;
      10    char c2 : 1;
      11    char c3 : 1;
      12    char c4 : 1;
      13  } REVERSE_SSO;
      14  
      15  int main (void)
      16  {
      17    struct S s0 = { 341, 1, 1, 1, 1 };
      18    char *p = (char *) &s0;
      19  
      20  #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
      21    if (*p != 21)
      22      __builtin_abort ();
      23  #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
      24    if (*p != 85)
      25      __builtin_abort ();
      26  #endif
      27  
      28    return 0;
      29  }