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