preprocessor: Create the parser before handling command-line includes [PR115312]
[official-gcc.git] / gcc / testsuite / g++.dg / inherit / conv3.C
blob73d8c20f1430944c8ebffce50dce0e4b933ccd39
1 // PR 31074
2 // Bug: The reference cast wasn't finding the desired static_cast followed by
3 // const_cast interpretation.
5 struct Shape
7   Shape() {}
8   virtual ~Shape() {}
9 };
11 struct Loop
13   Loop() {}
14   virtual ~Loop() {}
15   virtual void func() {}
18 struct Rect :
19   public Shape,
20   public Loop
22   Rect() {}
23   virtual ~Rect() {}
26 int main ()
28   const Rect* rect = new Rect();
29   Loop &l = ((Loop&)(*rect));
30   return (&l != (const Loop *)rect);