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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [other/] [pr24623.C] - Blame information for rev 853

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

Line No. Rev Author Line
1 149 jeremybenn
/* This used to ICE due to a backend problem on s390.  */
2
 
3
/* { dg-do compile } */
4
/* { dg-options "-O1" } */
5
 
6
class ReferenceCounted
7
{
8
public:
9
 
10
  virtual ~ ReferenceCounted ()
11
  {
12
  }
13
  void decrementRefCount () const
14
  {
15
    if (--const_cast < unsigned int &>(_ref_count) == 0)
16
      {
17
        delete this;
18
      }
19
  }
20
  unsigned int _ref_count;
21
};
22
 
23
template < class T > class RefCountPointer
24
{
25
public:
26
 
27
RefCountPointer (T * p = 0):_p (p)
28
  {
29
  }
30
  RefCountPointer & operator= (const RefCountPointer < T > &o)
31
  {
32
    if (_p != o._p)
33
      {
34
        if (_p != 0)
35
          _p->decrementRefCount ();
36
      }
37
  }
38
  ~RefCountPointer ()
39
  {
40
  }
41
  T *_p;
42
};
43
class Item:public ReferenceCounted
44
{
45
public:
46
 
47
  typedef RefCountPointer < const Item > Ptr;
48
};
49
class AnyAtomicType:public Item
50
{
51
};
52
class StaticContext
53
{
54
};
55
class DynamicContext:public StaticContext
56
{
57
};
58
class SortableItem
59
{
60
  SortableItem ();
61
  int m_bAscending:1;
62
  DynamicContext *m_context;
63
    AnyAtomicType::Ptr m_item;
64
};
65
SortableItem::SortableItem ()
66
{
67
  m_context = __null;
68
  m_item = __null;
69
}

powered by: WebSVN 2.1.0

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