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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-Wno-psabi" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
3
 
4
/* Testcase by Martin Michlmayr <tbm@cyrius.com> */
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
 
27
/* { 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.