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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [other/] [pr24623.C] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
/* This used to ICE due to a backend problem on s390.  */
/* This used to ICE due to a backend problem on s390.  */
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-O1" } */
/* { dg-options "-O1" } */
class ReferenceCounted
class ReferenceCounted
{
{
public:
public:
  virtual ~ ReferenceCounted ()
  virtual ~ ReferenceCounted ()
  {
  {
  }
  }
  void decrementRefCount () const
  void decrementRefCount () const
  {
  {
    if (--const_cast < unsigned int &>(_ref_count) == 0)
    if (--const_cast < unsigned int &>(_ref_count) == 0)
      {
      {
        delete this;
        delete this;
      }
      }
  }
  }
  unsigned int _ref_count;
  unsigned int _ref_count;
};
};
template < class T > class RefCountPointer
template < class T > class RefCountPointer
{
{
public:
public:
RefCountPointer (T * p = 0):_p (p)
RefCountPointer (T * p = 0):_p (p)
  {
  {
  }
  }
  RefCountPointer & operator= (const RefCountPointer < T > &o)
  RefCountPointer & operator= (const RefCountPointer < T > &o)
  {
  {
    if (_p != o._p)
    if (_p != o._p)
      {
      {
        if (_p != 0)
        if (_p != 0)
          _p->decrementRefCount ();
          _p->decrementRefCount ();
      }
      }
  }
  }
  ~RefCountPointer ()
  ~RefCountPointer ()
  {
  {
  }
  }
  T *_p;
  T *_p;
};
};
class Item:public ReferenceCounted
class Item:public ReferenceCounted
{
{
public:
public:
  typedef RefCountPointer < const Item > Ptr;
  typedef RefCountPointer < const Item > Ptr;
};
};
class AnyAtomicType:public Item
class AnyAtomicType:public Item
{
{
};
};
class StaticContext
class StaticContext
{
{
};
};
class DynamicContext:public StaticContext
class DynamicContext:public StaticContext
{
{
};
};
class SortableItem
class SortableItem
{
{
  SortableItem ();
  SortableItem ();
  int m_bAscending:1;
  int m_bAscending:1;
  DynamicContext *m_context;
  DynamicContext *m_context;
    AnyAtomicType::Ptr m_item;
    AnyAtomicType::Ptr m_item;
};
};
SortableItem::SortableItem ()
SortableItem::SortableItem ()
{
{
  m_context = __null;
  m_context = __null;
  m_item = __null;
  m_item = __null;
}
}
 
 

powered by: WebSVN 2.1.0

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