1 // RUN: %clang_cc1 -emit-llvm -o - %s
3 extern "C" int printf(...);
6 F() : iF(1), fF(2.0) {}
21 struct B1
: virtual V
{
26 class A
: public B
, public B1
{
28 A() : f(1.0), d(2.0), Ai(3) {}
35 template <typename T
> struct TT
{
45 printf(" %d %f\n", b
.iF
, b
.fF
);
48 void test_aggr_pdata(A
& a1
) {
54 printf(" %d %f\n", (a1
.*af
).iF
, (a1
.*af
).fF
);
63 void test_aggr_pdata_1(A
* pa
) {
68 (pa
->*af
).fF
= 200.00;
69 printf(" %d %f\n", (pa
->*af
).iF
, (pa
->*af
).fF
);
84 float A::* pf
= &A::f
;
85 double A::* pd
= &A::d
;
87 printf("%d %d %d\n", &A::Ai
, &A::f
, &A::d
);
88 printf("%d\n", &A::B::iB
);
89 printf("%d\n", &A::B1::iB1
);
90 printf("%d\n", &A::f
);
91 printf("%d\n", &A::B::iV
);
92 printf("%d\n", &A::B1::iV
);
93 printf("%d\n", &A::B::V::iV
);
94 printf("%d\n", &A::B1::V::iV
);
95 printf("%d, %f, %f \n", a1
.*pa
, a1
.*pf
, a1
.*pd
);
96 printf("%d\n", i
.*tt
.pti
);
98 test_aggr_pdata_1(&a1
);