action: print '?' for unknown read-from-future
[model-checker.git] / action.cc
index a321a85edede7f0b12a47142f61e44a33f561cbd..692d14cf03033d4b3c89ed7e05a7d386acdfe352 100644 (file)
--- a/action.cc
+++ b/action.cc
@@ -265,8 +265,12 @@ void ModelAction::print(void) const
 
        printf("(%3d) Thread: %-2d   Action: %-13s   MO: %7s  Loc: %14p  Value: %-12" PRIu64,
                        seq_number, id_to_int(tid), type_str, mo_str, location, valuetoprint);
-       if (reads_from)
-               printf(" Rf: %d", reads_from->get_seq_number());
+       if (is_read()) {
+               if (reads_from)
+                       printf(" Rf: %d", reads_from->get_seq_number());
+               else
+                       printf(" Rf: ?");
+       }
        if (cv) {
                printf("\t");
                cv->print();