You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
870 B

  1. // This file is part of Eigen, a lightweight C++ template library
  2. // for linear algebra. Eigen itself is part of the KDE project.
  3. //
  4. // Copyright (C) 2010 Benoit Jacob <jacob.benoit.1@gmail.com>
  5. //
  6. // This Source Code Form is subject to the terms of the Mozilla
  7. // Public License v. 2.0. If a copy of the MPL was not distributed
  8. // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
  9. #include "main.h"
  10. void test_eigen2_bug_132() {
  11. int size = 100;
  12. MatrixXd A(size, size);
  13. VectorXd b(size), c(size);
  14. {
  15. VectorXd y = A.transpose() * (b-c); // bug 132: infinite recursion in coeffRef
  16. VectorXd z = (b-c).transpose() * A; // bug 132: infinite recursion in coeffRef
  17. }
  18. // the following ones weren't failing, but let's include them for completeness:
  19. {
  20. VectorXd y = A * (b-c);
  21. VectorXd z = (b-c).transpose() * A.transpose();
  22. }
  23. }