promise: bugfix - don't check value, check location
[model-checker.git] / model.cc
index a66648bce12064d9c6730dc845f8292f277e97f6..d7ffc8e972d7466c7611b393d03afd5a96d5cce0 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -2576,7 +2576,7 @@ void ModelChecker::mo_check_promises(const ModelAction *act, bool is_read_check)
                Promise *promise = (*promises)[i];
 
                // Is this promise on the same location?
-               if (promise->get_value() != write->get_value())
+               if (!promise->same_location(write))
                        continue;
 
                for (unsigned int j = 0; j < promise->get_num_readers(); j++) {