------- Comment #6 from rguenth at gcc dot gnu dot org 2007-11-10 16:42 ------- This looks like a bug in soplex. It does:
class UnitVector : public SVector { private: Element themem; Element themem1; public: ... UnitVector(int i = 0) : SVector(2, &themem) { add(i, 1.0); } and: class SVector { ... struct Element { Real val; int idx; }; Element *m_elem; ... SVector(int n = 0, Element* p_mem = 0) { setMem(n, p_mem); } ... void setMem(int n, Element* elmem) { (static_cast<void> (0)); if (n > 0) { (static_cast<void> (0)); elmem->val = 0; m_elem = &(elmem[1]); set_size( 0 ); set_max ( n - 1 ); } else m_elem = 0; } that is, SVector accesses themem, themem1 as array (obviously to avoid unneccessary default construction). If you fix this, the miscompile goes away. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34048