This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix assertion failure in compute_complex_ancestor_jump_func


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]