2018-05-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / sso-4.c
blob9eda11a46026a18fc0c236a5f39a826f0b55192b
1 /* Test support of scalar_storage_order attribute */
3 /* { dg-do compile } */
5 struct S
7 int i;
8 };
10 typedef struct S __attribute__((scalar_storage_order("big-endian"))) S1;
12 typedef struct S __attribute__((scalar_storage_order("little-endian"))) S2;
14 typedef struct S __attribute__((scalar_storage_order("other"))) S3; /* { dg-error "must be one of .big-endian. or .little-endian." } */
16 void incompatible_assign (struct S *s, S1 *s1, S2 *s2)
18 *s = *s1, *s = *s2; /* { dg-error "(incompatible types|no match)" } */
19 *s1 = *s2; /* { dg-error "(incompatible types|no match)" } */