Debian Codegraph @

gcc/testsuite/g++.dg/vect/pr33860a.cc

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-Wno-psabi" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
3
4 /* Testcase by Martin Michlmayr <[email protected]> */
5
6 class Matrix
7 {
8 public:
9 float data[4][4] __attribute__ ((__aligned__(16)));
10 Matrix operator* (const Matrix matrix) const;
11 void makeRotationAboutVector (void);
12 };
13 void Matrix::makeRotationAboutVector (void)
14 {
15 Matrix irx;
16 *this = irx * (*this);
17 }
18 Matrix Matrix::operator* (const Matrix matrix) const
19 {
20 Matrix ret;
21 for (int i = 0; i < 4; i++)
22 for (int j = 0; j < 4; j++)
23 ret.data[j][i] = matrix.data[j][2] + matrix.data[j][3];
24 return ret;
25 }
26