Fix couple of endianness issues in fold_ctor_reference
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20230630-1.c
blob7c1f15c177f055dfd1ee986d5932241b745abf5b
1 struct S {
2 short int i : 12;
3 char c1 : 1;
4 char c2 : 1;
5 char c3 : 1;
6 char c4 : 1;
7 };
9 int main (void)
11 struct S s0 = { 341, 1, 1, 1, 1 };
12 char *p = (char *) &s0;
14 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
15 if (*p != 85)
16 __builtin_abort ();
17 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
18 if (*p != 21)
19 __builtin_abort ();
20 #endif
22 return 0;