Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/abi/empty5.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-options "-fabi-version=0" } |
2 | |
3 struct A {}; | |
4 | |
5 struct B { | |
6 A a; | |
7 virtual void f () {} | |
8 }; | |
9 | |
10 struct C : public B, public A {}; | |
11 | |
131 | 12 #if __cpp_attributes |
13 struct C2 : public B | |
14 { | |
15 [[no_unique_address]] A a; | |
16 } c2; | |
17 #endif | |
18 | |
111 | 19 C c; |
20 | |
21 int main () { | |
22 if ((void*) (A*) &c != &c) | |
23 return 1; | |
131 | 24 #if __cpp_attributes |
25 if ((void*)&c2.a != &c2) | |
26 return 2; | |
27 #endif | |
111 | 28 } |