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 PR target/64055


On Mon, Dec 1, 2014 at 10:33 AM, Ilya Enkovich <enkovich.gnu@gmail.com> wrote:
> Hi,
>
> This patch fixes ICE in chkp_find_bound_slots_1 by checking for non constant values in array domain.  Bootstrapped on x86_64-unknown-linux-gnu with Ada.  gnat.dg/derived_aggregate.adb is a new pass.  OK for trunk?

Ok.

But now I'm curious - bounds-checking wasn't supposed to be used
for Ada but now it is?

Thanks,
Richard.

> Thanks,
> Ilya
> --
> 2014-12-01  Ilya Enkovich  <ilya.enkovich@intel.com>
>
>         PR target/64055
>         * tree-chkp.c (chkp_find_bound_slots_1): Allow non constant
>         values in array domain.
>
>
> diff --git a/gcc/tree-chkp.c b/gcc/tree-chkp.c
> index 3e38691..6665ce2 100644
> --- a/gcc/tree-chkp.c
> +++ b/gcc/tree-chkp.c
> @@ -1565,7 +1565,9 @@ chkp_find_bound_slots_1 (const_tree type, bitmap have_bound,
>        HOST_WIDE_INT esize = TREE_INT_CST_LOW (TYPE_SIZE (etype));
>        unsigned HOST_WIDE_INT cur;
>
> -      if (!maxval || integer_minus_onep (maxval))
> +      if (!maxval
> +         || TREE_CODE (maxval) != INTEGER_CST
> +         || integer_minus_onep (maxval))
>         return;
>
>        for (cur = 0; cur <= TREE_INT_CST_LOW (maxval); cur++)


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