Debian Codegraph @

gcc/testsuite/g++.dg/ipa/pr79931.C

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-ipa-all" } */
3
4 class DocumentImpl;
5 struct NodeImpl
6 {
7 virtual DocumentImpl * getOwnerDocument();
8 virtual NodeImpl * getParentNode();
9 virtual NodeImpl * removeChild(NodeImpl *oldChild);
10 };
11 struct AttrImpl : NodeImpl
12 {
13 NodeImpl *insertBefore(NodeImpl *newChild, NodeImpl *refChild);
14 };
15 struct DocumentImpl : NodeImpl
16 {
17 virtual NodeImpl *removeChild(NodeImpl *oldChild);
18 virtual int* getRanges();
19 };
20 NodeImpl *AttrImpl::insertBefore(NodeImpl *newChild, NodeImpl *refChild) {
21 NodeImpl *oldparent = newChild->getParentNode();
22 oldparent->removeChild(newChild);
23 this->getOwnerDocument()->getRanges();
24 return 0;
25 }