From 723a59ac26d28e42ad07221dc30b75ea8049ce1f Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Fri, 9 Jun 2017 12:54:40 +0200 Subject: [PATCH] add regression test for aliasing in product rewritting --- test/product.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/product.h b/test/product.h index 3b6511270..0425a929e 100644 --- a/test/product.h +++ b/test/product.h @@ -216,6 +216,8 @@ template void product(const MatrixType& m) // CwiseBinaryOp VERIFY_IS_APPROX(x = y + A*x, A*z); x = z; + VERIFY_IS_APPROX(x = y - A*x, A*(-z)); + x = z; // CwiseUnaryOp VERIFY_IS_APPROX(x = Scalar(1.)*(A*x), A*z); }