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: Jakub Jelinek <jakub at redhat dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, rguenther at suse dot de
- Date: Mon, 24 Apr 2017 12:51:51 +0200
- Subject: Re: Fix -fdump-ipa-all ICE
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E33FBC04B956
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E33FBC04B956
- References: <20170424104819.GB15800@kam.mff.cuni.cz>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Apr 24, 2017 at 12:48:19PM +0200, Jan Hubicka wrote:
> Hi,
> this patch fixes ICE in dumping that triggers somewhat overactive sanity check.
> I think it would be nice to get it into release branches so we could debug things
> more easily.
>
> I am going to commit to trunk, OK for release branches?
> Honza
> PR middle-end/79931
> * ipa-devirt.c (dump_possible_polymorphic_call_targets): Fix ICE.
No testcase in the patch?
> Index: ipa-devirt.c
> ===================================================================
> --- ipa-devirt.c (revision 246970)
> +++ ipa-devirt.c (working copy)
> @@ -3367,7 +3367,13 @@ dump_possible_polymorphic_call_targets (
> fprintf (f, " Speculative targets:");
> dump_targets (f, targets);
> }
> - gcc_assert (targets.length () <= len);
> + /* Ugly: during callgraph construction the target cache may get populated
> + before all targets are found. While this is harmless (because all local
> + types are discovered and only in those case we devirtualize fully and we
> + don't do speculative devirtualization before IPA stage) it triggers
> + assert here when dumping at that stage also populates the case with
> + speculative targets. Quietly ignore this. */
> + gcc_assert (symtab->state < IPA_SSA || targets.length () <= len);
> fprintf (f, "\n");
> }
>
Jakub