maybe_complain_about_tail_call (tree call_expr, const char *reason)
{
gcc_assert (TREE_CODE (call_expr) == CALL_EXPR);
- if (CALL_EXPR_MUST_TAIL_CALL (call_expr))
- {
- error_at (EXPR_LOCATION (call_expr), "cannot tail-call: %s", reason);
- CALL_EXPR_MUST_TAIL_CALL (call_expr) = 0;
- }
if (CALL_EXPR_TAILCALL (call_expr)
&& dump_file
&& (dump_flags & TDF_DETAILS))
print_generic_expr (dump_file, call_expr, TDF_SLIM);
fprintf (dump_file, "\n");
}
+ if (CALL_EXPR_MUST_TAIL_CALL (call_expr))
+ {
+ error_at (EXPR_LOCATION (call_expr), "cannot tail-call: %s", reason);
+ CALL_EXPR_MUST_TAIL_CALL (call_expr) = 0;
+ }
}
/* Fill in ARGS_SIZE and ARGS array based on the parameters found in
pp_string (pp, " [return slot optimization]");
if (CALL_EXPR_TAILCALL (node))
pp_string (pp, " [tail call]");
+ if (CALL_EXPR_MUST_TAIL_CALL (node))
+ pp_string (pp, " [must tail call]");
break;
case WITH_CLEANUP_EXPR: