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?
Thanks, Ilya -- 2014-12-01 Ilya Enkovich <ilya.enkov...@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++)