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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [template5.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do assemble  }
2
// Bug: g++ fails to compare integer constants properly.
3
 
4
template 
5
struct Matrix {
6
   int base [X] [Y];
7
};
8
 
9
template 
10
Matrix& Mul(Matrix& Q,Matrix& A,Matrix& B) {
11
  for(int i=0;i
12
    for(int j=0;j
13
      Q.base[i][j]=0;
14
      for(int k=0;k
15
        Q.base[i][j]+=A.base[i][k]*B.base[k][j];
16
      }
17
    }
18
  }
19
  return Q;
20
}
21
 
22
void f ()
23
{
24
   Matrix<2, 3> q;
25
   Matrix<2, 4> a;
26
   Matrix<4, 3> b;
27
   q = Mul (q, a, b);
28
}

powered by: WebSVN 2.1.0

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