On Thu, Jan 22, 2015 at 3:36 PM, Eric Botcazou <ebotca...@adacore.com> wrote:
> Hi,
>
> const_binop is now invoked on MEM_EXPR, which doesn't make much sense given
> the assertion at the end:
>
>   /* Make sure type and arg0 have the same saturating flag.  */
>   gcc_checking_assert (TYPE_SATURATING (type)
>                        == TYPE_SATURATING (TREE_TYPE (arg1)));
>
> Tested on x86_64-suse-linux, OK for the mainline?

I'd prefer a

   if (TREE_CODE_CLASS (code) != tcc_binary)
    return NULL_TREE;

before the above assert.  That matches what the code did before my reorg.

Ok with that change.

Thanks,
Richard.

>
> 2015-01-22  Eric Botcazou  <ebotca...@adacore.com>
>
>         * fold-const.c (fold_binary_loc): Do not call const_binop on MEM_REF.
>
>
> --
> Eric Botcazou

Reply via email to