> On 04/24/2017 12:51 PM, Jakub Jelinek wrote: > > No testcase in the patch? > > As Honza is busy right not, I'm sending one. Thanks (in fact I just forgot to include it and was about to send it now) but help is welcome!
Honza > > Martin > >From 87cef5e3123723f81c44dfafe86fa10b7925cea8 Mon Sep 17 00:00:00 2001 > From: marxin <mli...@suse.cz> > Date: Mon, 24 Apr 2017 14:02:54 +0200 > Subject: [PATCH] Add new test-case. > > gcc/testsuite/ChangeLog: > > 2017-04-24 Martin Liska <mli...@suse.cz> > > * g++.dg/ipa/pr79931.C: New test. > --- > gcc/testsuite/g++.dg/ipa/pr79931.C | 24 ++++++++++++++++++++++++ > 1 file changed, 24 insertions(+) > create mode 100644 gcc/testsuite/g++.dg/ipa/pr79931.C > > diff --git a/gcc/testsuite/g++.dg/ipa/pr79931.C > b/gcc/testsuite/g++.dg/ipa/pr79931.C > new file mode 100644 > index 00000000000..78f6e03c458 > --- /dev/null > +++ b/gcc/testsuite/g++.dg/ipa/pr79931.C > @@ -0,0 +1,24 @@ > +/* { dg-do compile } */ > +/* { dg-options "-O2 -fdump-ipa-all" } */ > + > +class DocumentImpl; > +struct NodeImpl > +{ > + virtual DocumentImpl * getOwnerDocument(); > + virtual NodeImpl * getParentNode(); > + virtual NodeImpl * removeChild(NodeImpl *oldChild); > +}; > +struct AttrImpl : NodeImpl > +{ > + NodeImpl *insertBefore(NodeImpl *newChild, NodeImpl *refChild); > +}; > +struct DocumentImpl : NodeImpl > +{ > + virtual NodeImpl *removeChild(NodeImpl *oldChild); > + virtual int* getRanges(); > +}; > +NodeImpl *AttrImpl::insertBefore(NodeImpl *newChild, NodeImpl *refChild) { > + NodeImpl *oldparent = newChild->getParentNode(); > + oldparent->removeChild(newChild); > + this->getOwnerDocument()->getRanges(); > +} > -- > 2.12.2 >