This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix -fdump-ipa-all ICE
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Martin Liška <mliska at suse dot cz>
- Cc: Jakub Jelinek <jakub at redhat dot com>, gcc-patches at gcc dot gnu dot org, rguenther at suse dot de
- Date: Mon, 24 Apr 2017 14:12:31 +0200
- Subject: Re: Fix -fdump-ipa-all ICE
- Authentication-results: sourceware.org; auth=none
- References: <20170424104819.GB15800@kam.mff.cuni.cz> <20170424105151.GM1809@tucnak> <750978e8-b157-be2f-f1b0-1c9483fc9d81@suse.cz>
> 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 <mliska@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 <mliska@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
>