+2016-05-10 Ilya Enkovich <ilya.enkovich@intel.com>
+
+ PR tree-optimization/70786
+ * tree-chkp.c (chkp_find_bounds_1): Support WITH_SIZE_EXPR.
+ * gcc/calls.c (initialize_argument_information): Bind bounds
+ with corresponding args passed by reference.
+
2016-05-10 Jakub Jelinek <jakub@redhat.com>
PR target/70927
j--;
}
}
+ argpos = 0;
FOR_EACH_CALL_EXPR_ARG (arg, iter, exp)
{
tree argtype = TREE_TYPE (arg);
chkp_find_bound_slots (argtype, slots);
}
}
+ else if (CALL_WITH_BOUNDS_P (exp)
+ && pass_by_reference (NULL, TYPE_MODE (argtype), argtype,
+ argpos < n_named_args))
+ {
+ if (slots)
+ BITMAP_FREE (slots);
+ ptr_arg = j;
+ }
else if (POINTER_BOUNDS_TYPE_P (argtype))
{
/* We expect bounds in instrumented calls only.
else
args[j].tree_value = arg;
j--;
+ argpos++;
}
if (slots)
+2016-05-10 Ilya Enkovich <ilya.enkovich@intel.com>
+
+ PR tree-optimization/70786
+ * gcc.target/i386/pr70876.c: New test.
+
2016-05-10 Jakub Jelinek <jakub@redhat.com>
PR target/70927
--- /dev/null
+/* { dg-do compile { target { ! x32 } } } */
+/* { dg-options "-fcheck-pointer-bounds -mmpx -Wno-implicit-function-declaration" } */
+
+void f (char *s1, char *s2)
+{
+ int z = 5;
+
+ struct { char a[z]; } x;
+
+ s1[0] = s2[0];
+
+ foo (x, x);
+}
break;
case ADDR_EXPR:
+ case WITH_SIZE_EXPR:
bounds = chkp_make_addressed_object_bounds (TREE_OPERAND (ptr_src, 0), iter);
break;