------- Comment #4 from pinskia at gcc dot gnu dot org  2005-10-06 16:11 -------
Reduced testcase at -O1 -ftree-vrp -ftree-pre:
struct MemoryManager {
  virtual void deallocate() = 0;
};
struct XalanVector {
  ~XalanVector()   {
    m_memoryManager->deallocate();
  }
  void swap(XalanVector& theOther)   {
    MemoryManager* const theTempManager = m_memoryManager;
    m_memoryManager = theOther.m_memoryManager;
    theOther.m_memoryManager = theTempManager;
    theOther.m_size = 0;
  }
  void push_back()   {
    XalanVector theTemp(*this);
    theTemp.push_back();
    swap(theTemp);
  }
  MemoryManager* m_memoryManager;
  int m_size;
};
void f(void) {
  XalanVector tempVector;
  tempVector.push_back();
}


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-10-06 16:11:31
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24231

Reply via email to