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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr34222.C] - 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
 
3
namespace std __attribute__ ((__visibility__ ("default"))) {
4
    template     struct char_traits;
5
  }
6
__extension__ typedef __PTRDIFF_TYPE__ ptrdiff_t;
7
namespace std __attribute__ ((__visibility__ ("default"))) {
8
    typedef ptrdiff_t streamsize;
9
    template >     class basic_ifstream;
10
    typedef basic_ifstream ifstream;
11
    class ios_base   {
12
    };
13
  }
14
template class Vector4 {
15
   public:
16
      inline Vector4();
17
      inline Vector4(T, T, T, T);
18
      T x, y, z, w;
19
  };
20
template class Matrix4 {
21
   public:
22
      Matrix4(const Vector4&, const Vector4&,             const Vector4&, const Vector4&);
23
      Matrix4(const Matrix4& m);
24
      Vector4 r[4];
25
  };
26
typedef Vector4 Vec4f;
27
typedef Matrix4 Mat4f;
28
template Vector4::Vector4() : x(0), y(0), z(0), w(0) {
29
  }
30
template Vector4::Vector4(T _x, T _y, T _z, T _w) :     x(_x), y(_y), z(_z), w(_w) {
31
  }
32
template Matrix4::Matrix4(const Vector4& v0,                                       const Vector4& v1,                                       const Vector4& v2,                                       const Vector4& v3) {
33
  }
34
namespace std __attribute__ ((__visibility__ ("default"))) {
35
    template     class basic_ios : public ios_base     {
36
      };
37
    template     class basic_istream : virtual public basic_ios<_CharT, _Traits>     {
38
      public:
39
        typedef _CharT char_type;
40
        typedef basic_istream<_CharT, _Traits> __istream_type;
41
        __istream_type&       read(char_type* __s, streamsize __n);
42
      };
43
    template     class basic_ifstream : public basic_istream<_CharT, _Traits>     {
44
      };
45
  }
46
using namespace std;
47
static float readFloat(ifstream& in) {
48
      float f;
49
      in.read((char*) &f, sizeof(float));
50
  }
51
Mat4f readMeshMatrix(ifstream& in, int nBytes) {
52
      float m00 = readFloat(in);
53
      float m01 = readFloat(in);
54
      float m02 = readFloat(in);
55
      float m10 = readFloat(in);
56
      float m11 = readFloat(in);
57
      float m12 = readFloat(in);
58
      float m20 = readFloat(in);
59
      float m21 = readFloat(in);
60
      float m22 = readFloat(in);
61
      float m30 = readFloat(in);
62
      float m31 = readFloat(in);
63
      float m32 = readFloat(in);
64
      return Mat4f(Vec4f(m00, m01, m02, 0),                  Vec4f(m10, m11, m12, 0),                  Vec4f(m20, m21, m22, 0),                  Vec4f(m30, m31, m32, 1));
65
  }

powered by: WebSVN 2.1.0

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