model: bugfix - correct the "equality" check for RR coherence
[model-checker.git] / model.cc
index bfb63e4..152e36e 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -1770,7 +1770,7 @@ bool ModelChecker::r_modification_order(ModelAction *curr, const rf_type *rf)
                                        if (prevrf) {
                                                if (!prevrf->equals(rf))
                                                        added = mo_graph->addEdge(prevrf, rf) || added;
-                                       } else if (!prevrf->equals(rf)) {
+                                       } else if (!prevrf_promise->equals(rf)) {
                                                added = mo_graph->addEdge(prevrf_promise, rf) || added;
                                        }
                                }