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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr45877.C] - 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
 
3
namespace std __attribute__ ((__visibility__ ("default")))
4
{
5
  typedef __SIZE_TYPE__ size_t;
6
  template     class allocator;
7
  template     struct char_traits;
8
  template,
9
      typename _Alloc = allocator<_CharT> >
10
          class basic_string;
11
  typedef basic_string string;
12
  template     struct pair     { };
13
  template     class allocator    { };
14
  template
15
      struct binary_function     {
16
          typedef _Arg1 first_argument_type;
17
          typedef _Arg2 second_argument_type;
18
          typedef _Result result_type;
19
      };
20
  template
21
  class basic_string {
22
  public:
23
      basic_string(const _CharT* __s, const _Alloc& __a = _Alloc());
24
  };
25
  class type_info   {
26
  public:
27
      const char* name() const;
28
  };
29
  extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__))
30
  void * memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __len) throw ()
31
  {
32
      return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
33
  }
34
  template 
35
  class map {
36
      typedef _Key key_type;
37
      typedef _Tp mapped_type;
38
  public:
39
      mapped_type&       operator[](const key_type& __k);
40
  };
41
}
42
class CodeAlloc { };
43
using namespace std;
44
typedef void *Stack;
45
class basicForEachType;
46
typedef const basicForEachType * aType;
47
extern map map_type;
48
class AnyTypeWithOutCheck { };
49
typedef AnyTypeWithOutCheck AnyType;
50
template AnyTypeWithOutCheck inline SetAny(const T & x)
51
{
52
  AnyTypeWithOutCheck any;
53
  memcpy(&any,&x,sizeof(x));
54
}
55
template const T& GetAny(const AnyTypeWithOutCheck & x);
56
class E_F0;
57
class C_F0;
58
class Polymorphic;
59
typedef E_F0 * Expression;
60
class basicAC_F0;
61
extern Polymorphic * TheOperators, * TheRightOperators;
62
class basicForEachType : public CodeAlloc {
63
public:
64
    virtual C_F0 CastTo(const C_F0 & e) const ;
65
};
66
class E_F0 :public CodeAlloc    {
67
public:
68
    virtual AnyType operator()(Stack) const =0;
69
};
70
class E_F0mps : public E_F0 {
71
};
72
class ArrayOfaType : public CodeAlloc{
73
protected:
74
    aType * t;
75
};
76
class OneOperator : public ArrayOfaType {
77
public:
78
    OneOperator(aType rr,aType a,aType b);
79
    virtual E_F0 * code(const basicAC_F0 &) const =0;
80
};
81
class Polymorphic: public E_F0mps {
82
public:
83
    void Add(const char * op,OneOperator * p0 ,OneOperator * p1=0) const;
84
};
85
class C_F0 {
86
public:
87
    operator E_F0 * () const;
88
};
89
class basicAC_F0 {
90
public:
91
    const C_F0 & operator [] (int i) const;
92
};
93
struct OneBinaryOperatorMI { };
94
struct evalE_F2 { };
95
template
96
class OneBinaryOperator : public OneOperator
97
{
98
  typedef typename C::result_type R;
99
  typedef typename C::first_argument_type A;
100
  typedef typename C::second_argument_type B;
101
  aType t0,t1;
102
  class Op : public E_F0 {
103
      Expression a,b;
104
  public:
105
      AnyType operator()(Stack s) const {
106
          return SetAny(static_cast(C::f( GetAny((*a)(s)),
107
                                                GetAny((*b)(s)))));
108
      }
109
      Op(Expression aa,Expression bb) : a(aa),b(bb) { }
110
  };
111
public:
112
  E_F0 * code(const basicAC_F0 & args) const   {
113
      return new Op(t0->CastTo(args[0]),t1->CastTo(args[1]));
114
  }
115
  OneBinaryOperator()
116
      : OneOperator(map_type[typeid(R).name()],
117
                    map_type[typeid(A).name()],
118
                    map_type[typeid(B).name()]), t0(t[0]), t1(t[1]) { }
119
};
120
struct NothingType { };
121
class ShapeOfArray{ };
122
template class KN_: public ShapeOfArray { };
123
template  struct affectation: binary_function { };
124
template struct set_A_BI
125
: public binary_function,pair, KN_ > *,KN_ >
126
{
127
  static KN_ f(const KN_ & a, pair, KN_ > * const & b);
128
};
129
template struct set_AI_B
130
: public binary_function, KN_ > * ,KN_, NothingType >
131
{
132
  static NothingType f( pair, KN_ > * const & b,const KN_ & a);
133
};
134
template void ArrayOperator()
135
{
136
  TheOperators->Add("=", new OneBinaryOperator > >,
137
                    new OneBinaryOperator > >);
138
}
139
void initArrayOperatorlong() {
140
    ArrayOperator();
141
}

powered by: WebSVN 2.1.0

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