diff --git a/cppad.spec b/cppad.spec
index b7358b1..8ee4fbe 100644
--- a/cppad.spec
+++ b/cppad.spec
@@ -16,7 +16,7 @@
Name: cppad
Version: 20090303.0
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: No base package is installed, see %{name}-devel
Group: Development/Libraries
@@ -72,6 +72,37 @@ sed -i.stamp test_more/jacobian.cpp \
sed -i.stamp cppad/local/default.hpp \
-e 's/AD::AD(void) :/& value_(Base(0)), /'
+# This patch will no longer be needed once branches/sweep is merged into
+# the CppAD trunk (date is as yet unknown).
+sed -i.stamp cppad/local/fun_construct.hpp \
+ -e '/for(i = 0; i < m; i++)/,$d'
+cat << EOF >> cppad/local/fun_construct.hpp
+# ifndef NDEBUG
+ for(i = 0; i < m; i++) if( taylor_[dep_taddr_[i]] != y[i].value_ )
+ { using std::endl;
+ std::ostringstream buf;
+ buf << "A dependent variable value is not equal to "
+ << "its tape evaluation value (perhaps it is nan)" << endl
+ << "Dependent variable value = "
+ << y[i].value_ << endl
+ << "Tape evaluation value = "
+ << taylor_[dep_taddr_[i]] << endl
+ << "Difference = "
+ << y[i].value_ - taylor_[dep_taddr_[i]] << endl
+ ;
+ CPPAD_ASSERT_KNOWN(
+ 0,
+ buf.str().c_str()
+ );
+ }
+# endif
+}
+
+} // END CppAD namespace
+
+# endif
+EOF
+
# change example/example.cpp to print out machine epsilon
cat << EOF > example.sed
/^int main(void)/N
@@ -130,6 +161,10 @@ rm -rf $RPM_BUILD_ROOT
# ----------------------------------------------------------------------------
%changelog
+* Sat Jun 20 2009 Brad Bell 20090303-4
+- Patch cppad/local/fun_construct.hpp to give a more useful error message
+- (so we can figure out why the Fedora 11 build is failing).
+
* Mon Jun 06 2009 Brad Bell 20090303-3
- Patch file test_more/jacobian.cpp (required for versions below 20090606).
- Patch file cppad/local/default.hpp (required for versions below 20090606).