]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/sso-10.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / sso-10.c
CommitLineData
4e89adf9
EB
1/* { dg-do run } */
2/* { dg-options "-fsso-struct=native" } */
3/* { dg-require-effective-target int32plus } */
4
5struct S1
6{
7 int i;
8};
9
10
11struct S1 my_s1 = { 0x12345678 };
12
13unsigned char big_endian_pattern[4] = { 0x12, 0x34, 0x56, 0x78 };
14unsigned char little_endian_pattern[4] = { 0x78, 0x56, 0x34, 0x12 };
15
16int main (void)
17{
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
25
26 return 0;
27}