diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2016-09-18 12:42:15 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-11-02 15:12:04 +0100 |
| commit | 44861dcbfeee041223c4aac1ee075e92fa4daa01 (patch) | |
| tree | 6dfdfd9637846a7aedd71ace97d7d2ad366496d7 /eigen/test/eigen2/eigen2_bug_132.cpp | |
| parent | f3fe458b9e0a29a99a39d47d9a76dc18964b6fec (diff) | |
update
Diffstat (limited to 'eigen/test/eigen2/eigen2_bug_132.cpp')
| -rw-r--r-- | eigen/test/eigen2/eigen2_bug_132.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/eigen/test/eigen2/eigen2_bug_132.cpp b/eigen/test/eigen2/eigen2_bug_132.cpp new file mode 100644 index 0000000..7fe3610 --- /dev/null +++ b/eigen/test/eigen2/eigen2_bug_132.cpp @@ -0,0 +1,26 @@ +// This file is part of Eigen, a lightweight C++ template library +// for linear algebra. Eigen itself is part of the KDE project. +// +// Copyright (C) 2010 Benoit Jacob <jacob.benoit.1@gmail.com> +// +// This Source Code Form is subject to the terms of the Mozilla +// Public License v. 2.0. If a copy of the MPL was not distributed +// with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#include "main.h" + +void test_eigen2_bug_132() { + int size = 100; + MatrixXd A(size, size); + VectorXd b(size), c(size); + { + VectorXd y = A.transpose() * (b-c); // bug 132: infinite recursion in coeffRef + VectorXd z = (b-c).transpose() * A; // bug 132: infinite recursion in coeffRef + } + + // the following ones weren't failing, but let's include them for completeness: + { + VectorXd y = A * (b-c); + VectorXd z = (b-c).transpose() * A.transpose(); + } +} |
