Fix type in the changelog entry,
[official-gcc.git] / gcc / testsuite / g++.dg / ipa / devirt-10.C
blobfaab5121695250697a4185ece9602d758ffec958
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fdump-ipa-inline -fdump-ipa-cp -fno-early-inlining" } */
3 class wxPaintEvent {  };
4 struct wxDCBase
5
6   wxDCBase ();
7   virtual int GetLayoutDirection() const{}
8   virtual void SetLayoutDirection(int){}
9 };
10 struct wxWindowDC  : public wxDCBase {};
11 struct wxBufferedDC  : public wxDCBase
12
13   void Init(wxDCBase*dc) {
14     InitCommon(dc);
15   }
16   void InitCommon(wxDCBase*dc) {
17     if (dc)
18       SetLayoutDirection(dc->GetLayoutDirection());
19   }
21 struct wxBufferedPaintDC  : public wxBufferedDC {
22   wxBufferedPaintDC() {
23     Init(&m_paintdc);
24   }
25  wxWindowDC m_paintdc;
27 void  OnPaint(wxPaintEvent & event) {
28   wxBufferedPaintDC dc;
30 /* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target" 2 "cp"  } } */