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
This commit is contained in:
parent
f57f53d3a5
commit
0317e5a24c
@ -1,3 +1,8 @@
|
|||||||
|
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>
|
2016-06-11 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* gcc-interface/trans.c (build_binary_op_trapv): If no operand is a
|
* gcc-interface/trans.c (build_binary_op_trapv): If no operand is a
|
||||||
|
@ -171,6 +171,10 @@ known_alignment (tree exp)
|
|||||||
|
|
||||||
case CALL_EXPR:
|
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);
|
tree t = maybe_inline_call_in_expr (exp);
|
||||||
if (t)
|
if (t)
|
||||||
return known_alignment (t);
|
return known_alignment (t);
|
||||||
|
Loading…
Reference in New Issue
Block a user