URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [tags/] [gnu-dev/] [fsf-gcc-snapshot-1-mar-12/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [pr24231-3.C] - Rev 847
Go to most recent revision | Compare with Previous | Blame | View Log
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* PRE testcase for PR 24231, problem with PRE coalescing abnormal phis. */
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();
}
Go to most recent revision | Compare with Previous | Blame | View Log