Commit 9de21921 by Eric Botcazou Committed by Eric Botcazou

trans.c (Call_to_gnu): Set DECL_DISREGARD_INLINE_LIMITS to 0 on the callee if…

trans.c (Call_to_gnu): Set DECL_DISREGARD_INLINE_LIMITS to 0 on the callee if the call is recursive.

	* gcc-interface/trans.c (Call_to_gnu): Set DECL_DISREGARD_INLINE_LIMITS
	to 0 on the callee if the call is recursive.

From-SVN: r255648
parent 9df60a5d
2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Call_to_gnu): Set DECL_DISREGARD_INLINE_LIMITS
to 0 on the callee if the call is recursive.
2017-12-14 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_field): Do not set the alignment
of the enclosing record type if it is not already set.
......
......@@ -4306,11 +4306,17 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target,
return call_expr;
}
if (TREE_CODE (gnu_subprog) == FUNCTION_DECL)
{
/* For a call to a nested function, check the inlining status. */
if (TREE_CODE (gnu_subprog) == FUNCTION_DECL
&& decl_function_context (gnu_subprog))
if (decl_function_context (gnu_subprog))
check_inlining_for_nested_subprog (gnu_subprog);
/* For a recursive call, avoid explosion due to recursive inlining. */
if (gnu_subprog == current_function_decl)
DECL_DISREGARD_INLINE_LIMITS (gnu_subprog) = 0;
}
/* The only way we can be making a call via an access type is if Name is an
explicit dereference. In that case, get the list of formal args from the
type the access type is pointing to. Otherwise, get the formals from the
......
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