+2015-03-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/65523
+ * tree-chkp.c (chkp_build_returned_bound): Ignore
+ ERF_RETURNS_ARG calls if they have fewer than needed arguments.
+
2015-03-23 Oleg Endo <olegendo@gcc.gnu.org>
PR target/65505
2015-03-23 Jakub Jelinek <jakub@redhat.com>
+ PR target/65523
+ * gcc.target/i386/pr65523.c: New test.
+
PR ipa/65475
* g++.dg/lto/pr65475_0.C: Use dg-lto-options instead of
dg-options.
tree bounds;
gimple stmt;
tree fndecl = gimple_call_fndecl (call);
+ unsigned int retflags;
/* To avoid fixing alloca expands in targets we handle
it separately. */
}
/* Do not use retbnd when returned bounds are equal to some
of passed bounds. */
- else if (gimple_call_return_flags (call) & ERF_RETURNS_ARG)
+ else if (((retflags = gimple_call_return_flags (call)) & ERF_RETURNS_ARG)
+ && (retflags & ERF_RETURN_ARG_MASK) < gimple_call_num_args (call))
{
gimple_stmt_iterator iter = gsi_for_stmt (call);
- unsigned int retarg = 0, argno;
- if (gimple_call_return_flags (call) & ERF_RETURNS_ARG)
- retarg = gimple_call_return_flags (call) & ERF_RETURN_ARG_MASK;
+ unsigned int retarg = retflags & ERF_RETURN_ARG_MASK, argno;
if (gimple_call_with_bounds_p (call))
{
for (argno = 0; argno < gimple_call_num_args (call); argno++)