| 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{ return 0; } |
| 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 |
} |
| 20 |
}; |
| 21 |
struct wxBufferedPaintDC : public wxBufferedDC { |
| 22 |
wxBufferedPaintDC() { |
| 23 |
Init(&m_paintdc); |
| 24 |
} |
| 25 |
wxWindowDC m_paintdc; |
| 26 |
}; |
| 27 |
void OnPaint(wxPaintEvent & event) { |
| 28 |
wxBufferedPaintDC dc; |
| 29 |
} |
| 30 |
/* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target" 2 "cp" } } */ |