From: Brian Norris <banorris@uci.edu>
Date: Thu, 13 Sep 2012 21:58:36 +0000 (-0700)
Subject: model: bugfix - don't clobber 'updated'
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2c43bb9930926c9671d6fce4c542a4a6c415f1b3;p=cdsspec-compiler.git

model: bugfix - don't clobber 'updated'

The 'updated' variable should stay 'true' even if modification orders and
promises aren't updated by the "write" checks. This could be a RMW which made
updates via the "read" checks.
---

diff --git a/model.cc b/model.cc
index 1cde354..d23e994 100644
--- a/model.cc
+++ b/model.cc
@@ -401,7 +401,7 @@ Thread * ModelChecker::check_current_action(ModelAction *curr)
 	if (curr->is_write()) {
 		bool updated_mod_order = w_modification_order(curr);
 		bool updated_promises = resolve_promises(curr);
-		updated = updated_mod_order || updated_promises;
+		updated = updated || updated_mod_order || updated_promises;
 
 		if (promises->size()==0) {
 			for (unsigned int i = 0; i<futurevalues->size(); i++) {