1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fgraphite-identity" } */
4 template<typename Tp > class vector { };
6 template <int rank, int dim> class Tensor;
8 template <int dim> class Tensor<1,dim> {
10 Tensor (const Tensor<1,dim> &);
12 double values[(dim != 0) ? (dim) : 1];
17 // declaring this noinline prevents the ICE
18 __attribute__ ((noinline))
20 Tensor<1,dim>::Tensor (const Tensor<1,dim> &p)
22 for (unsigned int i = 0; i < dim; ++i)
23 values[i] = p.values[i];
26 template <int rank, int dim>
28 Tensor<rank-1,dim> subtensor[dim];
31 template <int dim> class Base {
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<Tensor<2,dim> >& d2) const;
41 void Base<dim>:: getf2d
42 (vector<Tensor<2,dim> > &d2) const
44 unsigned int point, sf;
46 for (point = 0; point < npoints; ++point)
47 for (sf = 0; sf < dofs; ++sf)
48 Tensor<2,dim> tmp = s2d (sf, point);
51 template void Base<3>::getf2d (vector<Tensor<2,3> > &) const;