This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix assertion failure in compute_complex_ancestor_jump_func
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 17 Feb 2014 12:42:37 +0100
- Subject: Re: [patch] Fix assertion failure in compute_complex_ancestor_jump_func
- Authentication-results: sourceware.org; auth=none
- References: <4640781 dot 6Z6p30UbJ5 at polaris>
On Mon, Feb 17, 2014 at 11:13 AM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> Hi,
>
> this is a regression present on all active branches. The following assertion
> triggers in compute_complex_ancestor_jump_func:
>
> index = ipa_get_param_decl_index (info, SSA_NAME_VAR (parm));
> gcc_assert (index >= 0);
>
> because the PARM_DECL is the static_chain_decl so the returned index is -1.
> It seems to me that this assertion is overzealous: in many other places, the
> code explicitly tests for the non-negativity of index and returns otherwise.
>
> Hence the proposed fix, tested on x86_64-suse-linux, OK for all branches?
Ok. [makes me wonder if we should apply propagation to the static chain
and a possibly pointer call 'fn' as well]
Thanks,
Richard.
> 2014-02-17 Eric Botcazou <ebotcazou@adacore.com>
>
> * ipa-prop.c (compute_complex_ancestor_jump_func): Replace overzealous
> assertion with conditional return.
>
>
> 2014-02-17 Eric Botcazou <ebotcazou@adacore.com>
>
> * gnat.dg/opt32.adb: New test.
>
>
> --
> Eric Botcazou