diff --git a/tools/qfcc/source/dags.c b/tools/qfcc/source/dags.c index 096ce0e82..65fab6044 100644 --- a/tools/qfcc/source/dags.c +++ b/tools/qfcc/source/dags.c @@ -777,10 +777,13 @@ dagnode_attach_label (dag_t *dag, dagnode_t *n, daglabel_t *l) return 0; } - // this assignment to the variable must come after any previous uses, + // this assignment to the variable must come after any previous uses, // which includes itself and its parents set_add (n->edges, node->number); set_union (n->edges, node->parents); + // nodes never need edges to themselves, but n might be one of node's + // parents + set_remove (n->edges, n->number); dagnode_set_reachable (dag, n); } l->live = 0; // remove live forcing on assignment