Mercurial > hg > CbC > CbC_gcc
diff gcc/testsuite/gcc.dg/sso-5.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gcc/testsuite/gcc.dg/sso-5.c Fri Oct 27 22:46:09 2017 +0900 @@ -0,0 +1,24 @@ +/* Test support of scalar_storage_order attribute */ + +/* { dg-do compile } */ + +struct S3 +{ + struct __attribute__((scalar_storage_order("big-endian"))) S1 + { + int i; + } s1; +}; + +struct S4 +{ + struct __attribute__((scalar_storage_order("little-endian"))) S2 + { + int i; + } s2; +}; + +void incompatible_assign (struct S3 *s3, struct S4 *s4) +{ + s3->s1 = s4->s2; /* { dg-error "(incompatible types|no match)" } */ +}