LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / gcc / testsuite / gcc.dg / sso-10.c
blob9dfa2974a2e2cb08925396a7478e3e0fd8dce373
1 /* { dg-do run } */
2 /* { dg-options "-fsso-struct=native" } */
3 /* { dg-require-effective-target int32plus } */
5 struct S1
7 int i;
8 };
11 struct S1 my_s1 = { 0x12345678 };
13 unsigned char big_endian_pattern[4] = { 0x12, 0x34, 0x56, 0x78 };
14 unsigned char little_endian_pattern[4] = { 0x78, 0x56, 0x34, 0x12 };
16 int main (void)
18 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
19 if (__builtin_memcmp (&my_s1, &little_endian_pattern, 4) != 0)
20 __builtin_abort ();
21 #else
22 if (__builtin_memcmp (&my_s1, &big_endian_pattern, 4) != 0)
23 __builtin_abort ();
24 #endif
26 return 0;