blob: 7e945a20dcdb167ae7fdc3feeda8364332f54317 [file] [log] [blame]
Fariborz Jahaniana6362992009-10-21 18:38:00 +00001// RUN: clang-cc -emit-llvm -o - %s
2
3extern "C" int printf(...);
4
Fariborz Jahanian39762952009-10-21 21:01:47 +00005struct V {
6 double d;
7 int iV;
8};
9
10struct B : virtual V{
11 double d;
12 int iB;
13};
14
15struct B1 : virtual V{
16 double d;
17 int iB1;
18};
19
20class A : public B, public B1 {
Fariborz Jahaniana6362992009-10-21 18:38:00 +000021public:
Fariborz Jahaniana6362992009-10-21 18:38:00 +000022 float f;
23 double d;
24 int Ai;
25};
26
27int main()
28{
29 A a1;
30 int A::* pa = &A::Ai;
31 float A::* pf = &A::f;
32 double A::* pd = &A::d;
33 printf("%d %d %d\n", &A::Ai, &A::f, &A::d);
Fariborz Jahanian39762952009-10-21 21:01:47 +000034 printf("%d\n", &A::B::iB);
35 printf("%d\n", &A::B1::iB1);
36 printf("%d\n", &A::f);
37 printf("%d\n", &A::B::iV);
38 printf("%d\n", &A::B1::iV);
39 printf("%d\n", &A::B::V::iV);
40 printf("%d\n", &A::B1::V::iV);
Fariborz Jahaniana6362992009-10-21 18:38:00 +000041 // FIXME. NYI
42 // printf(" %d, %f, %f \n", a1.*pa, a1.f, a1.d);
43}