Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/pack-test-5.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* PR c/11446: packed on a struct takes precedence over aligned on the type |
2 of a field. */ | |
3 /* { dg-do run } */ | |
4 /* { dg-additional-options "-mno-ms-bitfields" { target *-*-mingw* } } */ | |
5 | |
6 extern void abort (void); | |
7 | |
8 struct A { | |
9 double d; | |
10 } __attribute__ ((aligned)); | |
11 | |
12 struct B { | |
13 char c; | |
14 struct A a; | |
15 } __attribute__ ((packed)); | |
16 | |
17 int main () | |
18 { | |
19 if (sizeof (struct B) != sizeof (char) + sizeof (struct A)) | |
20 abort (); | |
21 return 0; | |
22 } |