OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [vect/] [pr33860.cc] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* { 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" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.