aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/adjoint.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2019-01-16 14:33:45 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2019-01-16 14:33:45 +0100
commit502f7179801a9b6ae5f6d6df60e72d5064702925 (patch)
tree9ec4450778765edf9ff590eb5c9aa430d5db95ff /test/adjoint.cpp
parent0b466b69336497628de8216ff797369b009a2946 (diff)
bug #1646: disable aliasing detection for empty and 1x1 expression
Diffstat (limited to 'test/adjoint.cpp')
-rw-r--r--test/adjoint.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/adjoint.cpp b/test/adjoint.cpp
index 4e1e4b5e8..7c8081ec4 100644
--- a/test/adjoint.cpp
+++ b/test/adjoint.cpp
@@ -171,6 +171,17 @@ void adjoint_extra()
c = MatrixXd::Ones(10,10) * 1.0 + c;
c = c + MatrixXd::Ones(10,10) .cwiseProduct( MatrixXd::Zero(10,10) );
c = MatrixXd::Ones(10,10) * MatrixXd::Zero(10,10);
+
+ // regression for bug 1646
+ for (int j = 0; j < 10; ++j) {
+ c.col(j).head(j) = c.row(j).head(j);
+ }
+
+ a.conservativeResize(1,1);
+ a = a.transpose();
+
+ a.conservativeResize(0,0);
+ a = a.transpose();
}
EIGEN_DECLARE_TEST(adjoint)