Skip to content

Commit

Permalink
Merge pull request #1113 from stan-dev/bugfix/issue-1063-gamma-tests-…
Browse files Browse the repository at this point in the history
…gcc7

do not pass uninitialized symbols
  • Loading branch information
seantalts committed Feb 7, 2019
2 parents 538b583 + d3a6a12 commit 70edefd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/unit/math/mix/mat/util/autodiff_tester.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ template <typename F>
void test_gradient(const F& f, const Eigen::VectorXd& x, double fx,
bool test_derivs) {
Eigen::VectorXd grad_ad;
double fx_ad;
double fx_ad = fx;
gradient<F>(f, x, fx_ad, grad_ad);
expect_near("test_gradient fx = fx_ad", fx, fx_ad);
if (!test_derivs || !is_finite(x) || !is_finite(fx))
Expand All @@ -137,7 +137,7 @@ template <typename F>
void test_gradient_fvar(const F& f, const Eigen::VectorXd& x, double fx,
bool test_derivs) {
Eigen::VectorXd grad_ad;
double fx_ad;
double fx_ad = fx;
gradient<double, F>(f, x, fx_ad, grad_ad);
expect_near("gradient_fvar fx == fx_ad", fx, fx_ad);
if (!test_derivs || !is_finite(x) || !is_finite(fx))
Expand Down

0 comments on commit 70edefd

Please sign in to comment.