Bug fix for cloning ...
authorHamed Gorjiara <hgorjiar@uci.edu>
Thu, 3 May 2018 00:18:30 +0000 (17:18 -0700)
committerHamed Gorjiara <hgorjiar@uci.edu>
Thu, 3 May 2018 00:18:30 +0000 (17:18 -0700)
src/AST/element.cc

index d09db20..565187a 100644 (file)
@@ -52,7 +52,8 @@ Element *ElementFunction::clone(CSolver *solver, CloneMap *map) {
        for (uint i = 0; i < inputs.getSize(); i++) {
                array[i] = inputs.get(i)->clone(solver, map);
        }
        for (uint i = 0; i < inputs.getSize(); i++) {
                array[i] = inputs.get(i)->clone(solver, map);
        }
-       Element *e = solver->applyFunction(function->clone(solver, map), array, inputs.getSize(), overflowstatus->clone(solver, map));
+       BooleanEdge ofstatus = overflowstatus ? cloneEdge(solver, map, overflowstatus) : BooleanEdge();
+       Element *e = solver->applyFunction(function->clone(solver, map), array, inputs.getSize(), ofstatus);
        return e;
 }
 
        return e;
 }