c++: robustify testcase [PR109752]
[official-gcc.git] / gcc / testsuite / g++.dg / pr107985.C
blob8d244b54efbd262d071005aab885edcf81c40726
1 /* { dg-do compile } */
2 /* { dg-options "-O1 -ftree-vrp -fno-tree-ccp -fno-tree-forwprop -fno-tree-fre" } */
4 struct B {
5   int f;
6 };
8 struct D : public B {
9 };
11 void foo() {
12   D d;
13   d.f = 7;
15   int B::* pfb = &B::f;
16   int D::* pfd = pfb;
17   int v = d.*pfd;