From 87d1428fb69c6c278ed2eb663cebdfb7c4c6d859 Mon Sep 17 00:00:00 2001 From: Cristian Cadar Date: Tue, 19 Jun 2012 14:30:26 +0000 Subject: Patch by Oscar Dustmann: "A pure-debug loop that only contained assertions was intended to be prevented to being seen by the compiler if and only if assertions were off altogher. However, due to the omission of the letter 'n' in ifndef, the loop was compiled if and only if assertions were *ON*. Thus the expression inside the assertion, was *never* compiled, let alone checked in 'Foo+Asserts' builds. Also, it was syntactically incorrect." git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@158720 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/klee/Expr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/klee/Expr.h b/include/klee/Expr.h index 09b288a8..8d5306f8 100644 --- a/include/klee/Expr.h +++ b/include/klee/Expr.h @@ -599,10 +599,10 @@ public: stpInitialArray(0) { assert((isSymbolicArray() || constantValues.size() == size) && "Invalid size for constant array!"); -#ifdef NDEBUG +#ifndef NDEBUG for (const ref *it = constantValuesBegin; it != constantValuesEnd; ++it) - assert(it->getWidth() == getRange() && + assert((*it)->getWidth() == getRange() && "Invalid initial constant value!"); #endif } -- cgit 1.4.1