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++.dg/] [graphite/] [pr43026.C] - Blame information for rev 779

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

Line No. Rev Author Line
1 301 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fgraphite-identity" } */
3
 
4
template class vector { };
5
 
6
template  class Tensor;
7
 
8
template  class Tensor<1,dim> {
9
public:
10
  Tensor (const Tensor<1,dim> &);
11
private:
12
  double values[(dim != 0) ? (dim) : 1];
13
};
14
 
15
template 
16
#ifdef NOINLINE
17
// declaring this noinline prevents the ICE
18
__attribute__ ((noinline))
19
#endif
20
Tensor<1,dim>::Tensor (const Tensor<1,dim> &p)
21
{
22
  for (unsigned int i = 0; i < dim; ++i)
23
    values[i] = p.values[i];
24
}
25
 
26
template 
27
class Tensor {
28
  Tensor subtensor[dim];
29
};
30
 
31
template  class Base {
32
public:
33
  const unsigned int npoints;
34
  const unsigned int dofs;
35
  const Tensor<2,dim> &s2d (const unsigned int fno,
36
                            const unsigned int pno) const;
37
  void getf2d (vector >& d2) const;
38
};
39
 
40
template 
41
void Base:: getf2d
42
  (vector > &d2) const
43
{
44
  unsigned int point, sf;
45
 
46
  for (point = 0; point < npoints; ++point)
47
    for (sf = 0; sf < dofs; ++sf)
48
      Tensor<2,dim> tmp = s2d (sf, point);
49
}
50
 
51
template void Base<3>::getf2d (vector > &) const;

powered by: WebSVN 2.1.0

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