Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/pack-test-5.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +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 } |