OSDN Git Service

gcc/cp/
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / vect / pr33860.cc
1 /* { dg-do compile } */
2 /* Testcase by Martin Michlmayr <tbm@cyrius.com> */
3
4 class Matrix
5 {
6   public:
7     double data[4][4];
8     Matrix operator* (const Matrix matrix) const;
9     void makeRotationAboutVector (void);
10 };
11 void Matrix::makeRotationAboutVector (void)
12 {
13    Matrix irx;
14    *this = irx * (*this);
15 }
16 Matrix Matrix::operator* (const Matrix matrix) const
17 {
18   Matrix ret;
19   for (int i = 0; i < 4; i++)
20     for (int j = 0; j < 4; j++)
21       ret.data[j][i] = matrix.data[j][2] + matrix.data[j][3];
22   return ret;
23 }
24
25 /* { dg-final { cleanup-tree-dump "vect" } } */