1 /* Test support of scalar_storage_order pragma */
4 /* { dg-options "-fsso-struct=little-endian" } */
5 /* { dg-require-effective-target int32plus } */
12 #pragma scalar_storage_order big-endian
19 #pragma scalar_storage_order default
26 struct S1 my_s1
= { 0x12345678 };
27 struct S2 my_s2
= { 0x12345678 };
28 struct S3 my_s3
= { 0x12345678 };
30 unsigned char big_endian_pattern
[4] = { 0x12, 0x34, 0x56, 0x78 };
31 unsigned char little_endian_pattern
[4] = { 0x78, 0x56, 0x34, 0x12 };
35 if (__builtin_memcmp (&my_s1
, &little_endian_pattern
, 4) != 0)
38 if (__builtin_memcmp (&my_s2
, &big_endian_pattern
, 4) != 0)
41 if (__builtin_memcmp (&my_s3
, &little_endian_pattern
, 4) != 0)