Commit ef856020 by Martin Sebor Committed by Martin Sebor

PR bootstrap/86621 - 'alloca' bound is unknown in tree-vect-slp.c:1437:16

gcc/ChangeLog:
	* gcc/gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
	diagnosing calls with unknown arguments unless -Walloca-larger-than
	is restricted to less than PTRDIFF_MAX bytes.

From-SVN: r262923
parent 5037f87e
2018-07-22 Martin Sebor <msebor@redhat.com>
PR bootstrap/86621
* gcc/gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
diagnosing calls with unknown arguments unless -Walloca-larger-than
is restricted to less than PTRDIFF_MAX bytes.
2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
* doc/gcov.texi (Invoking Gcov): Editorial changes.
......
......@@ -214,7 +214,15 @@ alloca_call_type_by_arg (tree arg, tree arg_casted, edge e,
}
}
else
return alloca_type_and_limit (ALLOCA_BOUND_UNKNOWN);
{
/* Analogous to ALLOCA_UNBOUNDED, when MAX_SIZE is greater
than or equal to PTRDIFF_MAX, treat allocations with
an unknown bound as OK. */
alloca_type unknown_result
= (max_size < maxobjsize.to_uhwi ()
? ALLOCA_BOUND_UNKNOWN : ALLOCA_OK);
return alloca_type_and_limit (unknown_result);
}
}
// Similarly, but check for a comparison with an unknown LIMIT.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment