comparison 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
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
7 virtual void f () {} 7 virtual void f () {}
8 }; 8 };
9 9
10 struct C : public B, public A {}; 10 struct C : public B, public A {};
11 11
12 #if __cpp_attributes
13 struct C2 : public B
14 {
15 [[no_unique_address]] A a;
16 } c2;
17 #endif
18
12 C c; 19 C c;
13 20
14 int main () { 21 int main () {
15 if ((void*) (A*) &c != &c) 22 if ((void*) (A*) &c != &c)
16 return 1; 23 return 1;
24 #if __cpp_attributes
25 if ((void*)&c2.a != &c2)
26 return 2;
27 #endif
17 } 28 }