Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/ipa/devirt-10.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* { dg-do compile } */ /* { dg-options "-O3 -fdump-ipa-inline -fdump-ipa-cp -fno-early-inlining" } */ class wxPaintEvent { }; struct wxDCBase { wxDCBase (); virtual int GetLayoutDirection() const{ return 0; } virtual void SetLayoutDirection(int){} }; struct wxWindowDC : public wxDCBase {}; struct wxBufferedDC : public wxDCBase { void Init(wxDCBase*dc) { InitCommon(dc); } void InitCommon(wxDCBase*dc) { if (dc) SetLayoutDirection(dc->GetLayoutDirection()); } }; struct wxBufferedPaintDC : public wxBufferedDC { wxBufferedPaintDC() { Init(&m_paintdc); } wxWindowDC m_paintdc; }; void OnPaint(wxPaintEvent & event) { wxBufferedPaintDC dc; } /* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target" 2 "cp" } } */