Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.old-deja/g++.mike/align2.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 // { dg-do run } |
2 class Foo { | |
3 }; | |
4 | |
5 class Bar : virtual Foo { | |
6 public: | |
7 int b; | |
8 } x; | |
9 | |
10 int main() | |
11 { | |
12 // printf("Foo offset %d\n", (int)(Foo*)&x - (int)&x); | |
13 // printf("b offset %d\n", (int)&x.b - (int)&x); | |
14 // printf("sizeof is %d\n", sizeof(Bar)); | |
15 // This core dumps on a SPARC is alignment is wrong. | |
16 Bar blist[10]; | |
17 } |