Commit 0317e5a2 by Eric Botcazou Committed by Eric Botcazou

utils2.c (known_alignment): Deal specially with calls to malloc.

	* gcc-interface/utils2.c (known_alignment) <CALL_EXPR>: Deal specially
	with calls to malloc.

From-SVN: r237356
parent f57f53d3
2016-06-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils2.c (known_alignment) <CALL_EXPR>: Deal specially
with calls to malloc.
2016-06-11 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (build_binary_op_trapv): If no operand is a
......
......@@ -171,6 +171,10 @@ known_alignment (tree exp)
case CALL_EXPR:
{
tree func = get_callee_fndecl (exp);
if (func && DECL_IS_MALLOC (func))
return get_target_system_allocator_alignment () * BITS_PER_UNIT;
tree t = maybe_inline_call_in_expr (exp);
if (t)
return known_alignment (t);
......
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