if (gimple_code (stmt) == GIMPLE_CALL
&& gimple_call_flags (stmt) & ECF_RETURNS_TWICE)
{
- const char *misplaced = NULL;
+ bool misplaced = false;
/* TM is an exception: it points abnormal edges just after the
call that starts a transaction, i.e. it must end the BB. */
if (gimple_call_builtin_p (stmt, BUILT_IN_TM_START))
if (single_succ_p (bb)
&& bb_has_abnormal_pred (single_succ (bb))
&& !gsi_one_nondebug_before_end_p (gsi))
- misplaced = "not last";
+ {
+ error ("returns_twice call is not last in basic block "
+ "%d", bb->index);
+ misplaced = true;
+ }
}
else
{
- if (seen_nondebug_stmt
- && bb_has_abnormal_pred (bb))
- misplaced = "not first";
+ if (seen_nondebug_stmt && bb_has_abnormal_pred (bb))
+ {
+ error ("returns_twice call is not first in basic block "
+ "%d", bb->index);
+ misplaced = true;
+ }
}
if (misplaced)
{
- error ("returns_twice call is %s in basic block %d",
- misplaced, bb->index);
print_gimple_stmt (stderr, stmt, 0, TDF_SLIM);
err = true;
}