From 9604e019bf502a025d2ef9a81375931bfa081305 Mon Sep 17 00:00:00 2001 From: Alex Lin Date: Wed, 14 Sep 2016 09:33:08 -0500 Subject: [PATCH] ICG not setting default checkpointing io correctly. #308 If a checkpoint_io field is found we were or'ing this in to bits already set by default. Clear the bits first. --- trick_source/codegen/Interface_Code_Gen/FieldDescription.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trick_source/codegen/Interface_Code_Gen/FieldDescription.cpp b/trick_source/codegen/Interface_Code_Gen/FieldDescription.cpp index 314eb388..9317bf54 100644 --- a/trick_source/codegen/Interface_Code_Gen/FieldDescription.cpp +++ b/trick_source/codegen/Interface_Code_Gen/FieldDescription.cpp @@ -201,10 +201,10 @@ void FieldDescription::parseComment(std::string comment) { if ( chkpnt_io_found == true ) { // If a checkpoint I/O spec is found add it to the io field. - io |= (chkpnt_io << 2 ) ; + io = (chkpnt_io << 2 ) + ( io & 3 ) ; } else { // else duplicated the io field to the chkpnt io field. - io |= (io << 2 ) ; + io = (io << 2 ) + io ; } // The rest of the comment is the description of the variable.