}
else
{
- release_defs (stmt);
+ /* Release SSA definitions if we are in SSA. Note that we
+ may be called when not in SSA. For example,
+ final_cleanup calls this function via
+ cleanup_tree_cfg. */
+ if (in_ssa_p)
+ release_defs (stmt);
bsi_remove (&i);
}
if (TYPE_P (t))
*walk_subtrees = 0;
- /* Check operand N for being valid GIMPLE and give error MSG if not.
- We check for constants explicitly since they are not considered
- gimple invariants if they overflowed. */
+ /* Check operand N for being valid GIMPLE and give error MSG if not. */
#define CHECK_OP(N, MSG) \
- do { if (!CONSTANT_CLASS_P (TREE_OPERAND (t, N)) \
- && !is_gimple_val (TREE_OPERAND (t, N))) \
+ do { if (!is_gimple_val (TREE_OPERAND (t, N))) \
{ error (MSG); return TREE_OPERAND (t, N); }} while (0)
switch (TREE_CODE (t))
}
if (!is_gimple_condexpr (x))
{
- error ("Invalid conditional operand");
+ error ("invalid conditional operand");
return x;
}
break;
case BIT_NOT_EXPR:
case NON_LVALUE_EXPR:
case TRUTH_NOT_EXPR:
- CHECK_OP (0, "Invalid operand to unary operator");
+ CHECK_OP (0, "invalid operand to unary operator");
break;
case REALPART_EXPR:
while (handled_component_p (t))
{
if (TREE_CODE (t) == COMPONENT_REF && TREE_OPERAND (t, 2))
- CHECK_OP (2, "Invalid COMPONENT_REF offset operator");
+ CHECK_OP (2, "invalid COMPONENT_REF offset operator");
else if (TREE_CODE (t) == ARRAY_REF
|| TREE_CODE (t) == ARRAY_RANGE_REF)
{
- CHECK_OP (1, "Invalid array index.");
+ CHECK_OP (1, "invalid array index");
if (TREE_OPERAND (t, 2))
- CHECK_OP (2, "Invalid array lower bound.");
+ CHECK_OP (2, "invalid array lower bound");
if (TREE_OPERAND (t, 3))
- CHECK_OP (3, "Invalid array stride.");
+ CHECK_OP (3, "invalid array stride");
}
else if (TREE_CODE (t) == BIT_FIELD_REF)
{
- CHECK_OP (1, "Invalid operand to BIT_FIELD_REF");
- CHECK_OP (2, "Invalid operand to BIT_FIELD_REF");
+ CHECK_OP (1, "invalid operand to BIT_FIELD_REF");
+ CHECK_OP (2, "invalid operand to BIT_FIELD_REF");
}
t = TREE_OPERAND (t, 0);
if (!CONSTANT_CLASS_P (t) && !is_gimple_lvalue (t))
{
- error ("Invalid reference prefix.");
+ error ("invalid reference prefix");
return t;
}
*walk_subtrees = 0;
case BIT_IOR_EXPR:
case BIT_XOR_EXPR:
case BIT_AND_EXPR:
- CHECK_OP (0, "Invalid operand to binary operator");
- CHECK_OP (1, "Invalid operand to binary operator");
+ CHECK_OP (0, "invalid operand to binary operator");
+ CHECK_OP (1, "invalid operand to binary operator");
break;
default:
if (!is_gimple_stmt (stmt))
{
- error ("Is not a valid GIMPLE statement.");
+ error ("is not a valid GIMPLE statement");
goto fail;
}
{
if (!tree_could_throw_p (stmt))
{
- error ("Statement marked for throw, but doesn%'t.");
+ error ("statement marked for throw, but doesn%'t");
goto fail;
}
if (!last_in_block && tree_can_throw_internal (stmt))
{
- error ("Statement marked for throw in middle of block.");
+ error ("statement marked for throw in middle of block");
goto fail;
}
}
if (bb_for_stmt (phi) != bb)
{
- error ("bb_for_stmt (phi) is set to a wrong basic block\n");
+ error ("bb_for_stmt (phi) is set to a wrong basic block");
err |= true;
}
addr = walk_tree (&t, verify_node_sharing, htab, NULL);
if (addr)
{
- error ("Incorrect sharing of tree nodes");
+ error ("incorrect sharing of tree nodes");
debug_generic_stmt (phi);
debug_generic_stmt (addr);
err |= true;
if (bb_for_stmt (stmt) != bb)
{
- error ("bb_for_stmt (stmt) is set to a wrong basic block\n");
+ error ("bb_for_stmt (stmt) is set to a wrong basic block");
err |= true;
}
addr = walk_tree (&stmt, verify_node_sharing, htab, NULL);
if (addr)
{
- error ("Incorrect sharing of tree nodes");
+ error ("incorrect sharing of tree nodes");
debug_generic_stmt (stmt);
debug_generic_stmt (addr);
err |= true;
}
if (err)
- internal_error ("verify_stmts failed.");
+ internal_error ("verify_stmts failed");
htab_delete (htab);
timevar_pop (TV_TREE_STMT_VERIFY);
if (ENTRY_BLOCK_PTR->stmt_list)
{
- error ("ENTRY_BLOCK has a statement list associated with it\n");
+ error ("ENTRY_BLOCK has a statement list associated with it");
err = 1;
}
if (EXIT_BLOCK_PTR->stmt_list)
{
- error ("EXIT_BLOCK has a statement list associated with it\n");
+ error ("EXIT_BLOCK has a statement list associated with it");
err = 1;
}
FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
if (e->flags & EDGE_FALLTHRU)
{
- error ("Fallthru to exit from bb %d\n", e->src->index);
+ error ("fallthru to exit from bb %d", e->src->index);
err = 1;
}
if (prev_stmt && DECL_NONLOCAL (LABEL_EXPR_LABEL (stmt)))
{
- error ("Nonlocal label %s is not first "
+ error ("nonlocal label %s is not first "
"in a sequence of labels in bb %d",
IDENTIFIER_POINTER (DECL_NAME (LABEL_EXPR_LABEL (stmt))),
bb->index);
if (label_to_block (LABEL_EXPR_LABEL (stmt)) != bb)
{
- error ("Label %s to block does not match in bb %d\n",
+ error ("label %s to block does not match in bb %d",
IDENTIFIER_POINTER (DECL_NAME (LABEL_EXPR_LABEL (stmt))),
bb->index);
err = 1;
if (decl_function_context (LABEL_EXPR_LABEL (stmt))
!= current_function_decl)
{
- error ("Label %s has incorrect context in bb %d\n",
+ error ("label %s has incorrect context in bb %d",
IDENTIFIER_POINTER (DECL_NAME (LABEL_EXPR_LABEL (stmt))),
bb->index);
err = 1;
if (found_ctrl_stmt)
{
- error ("Control flow in the middle of basic block %d\n",
+ error ("control flow in the middle of basic block %d",
bb->index);
err = 1;
}
if (TREE_CODE (stmt) == LABEL_EXPR)
{
- error ("Label %s in the middle of basic block %d\n",
+ error ("label %s in the middle of basic block %d",
IDENTIFIER_POINTER (DECL_NAME (LABEL_EXPR_LABEL (stmt))),
bb->index);
err = 1;
FOR_EACH_EDGE (e, ei, bb->succs)
if (e->flags & EDGE_FALLTHRU)
{
- error ("Fallthru edge after a control statement in bb %d \n",
+ error ("fallthru edge after a control statement in bb %d",
bb->index);
err = 1;
}
if (TREE_CODE (COND_EXPR_THEN (stmt)) != GOTO_EXPR
|| TREE_CODE (COND_EXPR_ELSE (stmt)) != GOTO_EXPR)
{
- error ("Structured COND_EXPR at the end of bb %d\n", bb->index);
+ error ("structured COND_EXPR at the end of bb %d", bb->index);
err = 1;
}
|| (false_edge->flags & (EDGE_FALLTHRU | EDGE_ABNORMAL))
|| EDGE_COUNT (bb->succs) >= 3)
{
- error ("Wrong outgoing edge flags at end of bb %d\n",
+ error ("wrong outgoing edge flags at end of bb %d",
bb->index);
err = 1;
}
if (!has_label_p (true_edge->dest,
GOTO_DESTINATION (COND_EXPR_THEN (stmt))))
{
- error ("%<then%> label does not match edge at end of bb %d\n",
+ error ("%<then%> label does not match edge at end of bb %d",
bb->index);
err = 1;
}
if (!has_label_p (false_edge->dest,
GOTO_DESTINATION (COND_EXPR_ELSE (stmt))))
{
- error ("%<else%> label does not match edge at end of bb %d\n",
+ error ("%<else%> label does not match edge at end of bb %d",
bb->index);
err = 1;
}
case GOTO_EXPR:
if (simple_goto_p (stmt))
{
- error ("Explicit goto at end of bb %d\n", bb->index);
+ error ("explicit goto at end of bb %d", bb->index);
err = 1;
}
else
| EDGE_FALSE_VALUE))
|| !(e->flags & EDGE_ABNORMAL))
{
- error ("Wrong outgoing edge flags at end of bb %d\n",
+ error ("wrong outgoing edge flags at end of bb %d",
bb->index);
err = 1;
}
& (EDGE_FALLTHRU | EDGE_ABNORMAL
| EDGE_TRUE_VALUE | EDGE_FALSE_VALUE)))
{
- error ("Wrong outgoing edge flags at end of bb %d\n", bb->index);
+ error ("wrong outgoing edge flags at end of bb %d", bb->index);
err = 1;
}
if (single_succ (bb) != EXIT_BLOCK_PTR)
{
- error ("Return edge does not point to exit in bb %d\n",
+ error ("return edge does not point to exit in bb %d",
bb->index);
err = 1;
}
tree c = TREE_VEC_ELT (vec, i);
if (! CASE_LOW (c))
{
- error ("Found default case not at end of case vector");
+ error ("found default case not at end of case vector");
err = 1;
continue;
}
if (! tree_int_cst_lt (CASE_LOW (prev), CASE_LOW (c)))
{
- error ("Case labels not sorted:\n ");
+ error ("case labels not sorted:");
print_generic_expr (stderr, prev, 0);
fprintf (stderr," is greater than ");
print_generic_expr (stderr, c, 0);
}
if (CASE_LOW (TREE_VEC_ELT (vec, n - 1)))
{
- error ("No default case found at end of case vector");
+ error ("no default case found at end of case vector");
err = 1;
}
{
if (!e->dest->aux)
{
- error ("Extra outgoing edge %d->%d\n",
+ error ("extra outgoing edge %d->%d",
bb->index, e->dest->index);
err = 1;
}
if ((e->flags & (EDGE_FALLTHRU | EDGE_ABNORMAL
| EDGE_TRUE_VALUE | EDGE_FALSE_VALUE)))
{
- error ("Wrong outgoing edge flags at end of bb %d\n",
+ error ("wrong outgoing edge flags at end of bb %d",
bb->index);
err = 1;
}
if (label_bb->aux != (void *)2)
{
- error ("Missing edge %i->%i",
+ error ("missing edge %i->%i",
bb->index, label_bb->index);
err = 1;
}