list_to_array(edges, &nedges, false);
// Do tarjan's and convert back into the declaration list
- struct components *cs = scc(nfun, (void **)fundecls, nedges, edgedata);
+ int err;
+ struct components *cs = tarjans(nfun, (void **)fundecls, nedges, edgedata, &err);
+ if (cs == NULL) {
+ if (err == 1)
+ die("malformed edges in tarjan's????");
+ else
+ pdie("malloc");
+ }
+
int i = ffun;
FOREACHCOMP(c, cs) {
struct decl *d = safe_malloc(sizeof(struct decl));