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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr35164-1.C] - Blame information for rev 307

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

Line No. Rev Author Line
1 301 jeremybenn
typedef __SIZE_TYPE__ size_t;
2
template class __normal_iterator {
3
public:
4
  const _Iterator& base() const;
5
};
6
template inline
7
void copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) {
8
  while (__first != __last) *--__result = *--__last;
9
}
10
template struct _Vector_base {
11
  struct _Vector_impl { _Tp* _M_finish; };
12
  _Vector_impl _M_impl;
13
};
14
template class vector : protected _Vector_base<_Tp> {
15
  typedef vector<_Tp> vector_type;
16
  typedef _Tp * pointer;
17
  typedef _Tp & reference;
18
  typedef __normal_iterator iterator;
19
  typedef size_t size_type;
20
public:
21
  iterator end();
22
  void resize(size_type __new_size) { insert(end(), __new_size); }
23
  reference operator[](size_type __n);
24
  void insert(iterator __position, size_type __n)
25
  {
26
    pointer __old_finish(this->_M_impl._M_finish);
27
    copy_backward(__position.base(), __old_finish - __n, __old_finish);
28
  }
29
};
30
struct A {
31
  virtual ~A ();
32
  void incRef ();
33
  void decRef ();
34
};
35
struct C : public A {
36
  static C *alloc ();
37
};
38
template  struct B {
39
  B () : ptr (T::alloc ()) { }
40
  B (T *a_ptr) : ptr (a_ptr) { }
41
  ~B () { decRef (); }
42
  B& operator= (const B& a) { if (a.get () != this->get ()) { decRef ();
43
incRef (); } }
44
  template operator B () const { return B (ptr); }
45
  T* operator-> () const { }
46
  T* get () const { return ptr; }
47
  void decRef () const { if (ptr != 0) ptr->decRef (); }
48
  void incRef () const { if (ptr != 0) ptr->incRef (); }
49
  T *ptr;
50
};
51
struct D : public C {
52
  template  inline void foo (const B & x) { d.resize (1); d[0] = x;
53
}
54
  vector > d;
55
};
56
struct E : public C {
57
  static E *alloc ();
58
};
59
struct F : public D {
60
  static F *alloc ();
61
};
62
void foo (vector > & x) {
63
  for (int i = 0; i < 2; ++i)
64
    {
65
      B l;
66
      B m;
67
      l->foo (m);
68
    }
69
}

powered by: WebSVN 2.1.0

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