[qfcc] Improve accuracy of some more diagnostics

This commit is contained in:
Bill Currie 2020-03-16 09:24:34 +09:00
parent 0fe3fda44d
commit 2f07d9a310
2 changed files with 3 additions and 2 deletions

View file

@ -423,7 +423,8 @@ dagnode_set_edges (dag_t *dag, dagnode_t *n)
param_node = def_visit_all (param_def, 0, dag_find_node,
&daglabel);
if (!param_node) {
bug (0, ".param_%d not set for %s", i, n->label->opcode);
bug (n->label->expr, ".param_%d not set for %s", i,
n->label->opcode);
continue;
}
daglabel->live = 1;

View file

@ -1255,7 +1255,7 @@ flow_find_successors (flowgraph_t *graph)
if (sb->next) {
set_add (node->successors, sb->next->flownode->id);
} else {
bug (0, "code drops off the end of the function");
bug (st->expr, "code drops off the end of the function");
// this shouldn't happen
// however, make the exit dummy block the node's successor
set_add (node->successors, graph->num_nodes + 1);