Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/sso-4.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* Test support of scalar_storage_order attribute */ | |
2 | |
3 /* { dg-do compile } */ | |
4 | |
5 struct S | |
6 { | |
7 int i; | |
8 }; | |
9 | |
10 typedef struct S __attribute__((scalar_storage_order("big-endian"))) S1; | |
11 | |
12 typedef struct S __attribute__((scalar_storage_order("little-endian"))) S2; | |
13 | |
14 typedef struct S __attribute__((scalar_storage_order("other"))) S3; /* { dg-error "must be one of .big-endian. or .little-endian." } */ | |
15 | |
16 void incompatible_assign (struct S *s, S1 *s1, S2 *s2) | |
17 { | |
18 *s = *s1, *s = *s2; /* { dg-error "(incompatible types|no match)" } */ | |
19 *s1 = *s2; /* { dg-error "(incompatible types|no match)" } */ | |
20 } |