PR tree-optimization/83369 - Missing diagnostics during inlining
[official-gcc.git] / gcc / testsuite / gcc.dg / sso-8.c
blob5148188485fe4241eac90a422c967886d1cb3adc
1 /* Test support of scalar_storage_order pragma */
3 /* { dg-do run } */
4 /* { dg-options "-fsso-struct=little-endian" } */
5 /* { dg-require-effective-target int32plus } */
7 struct S1
9 int i;
12 #pragma scalar_storage_order big-endian
14 struct S2
16 int i;
19 #pragma scalar_storage_order default
21 struct S3
23 int i;
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 };
33 int main (void)
35 if (__builtin_memcmp (&my_s1, &little_endian_pattern, 4) != 0)
36 __builtin_abort ();
38 if (__builtin_memcmp (&my_s2, &big_endian_pattern, 4) != 0)
39 __builtin_abort ();
41 if (__builtin_memcmp (&my_s3, &little_endian_pattern, 4) != 0)
42 __builtin_abort ();
44 return 0;