Remove std::construct and std::destroy
Jeffrey Oldham
oldham@codesourcery.com
Tue Jul 3 12:40:00 GMT 2001
This morning, gcc/testsuite/g++.old-deja/g++.robertl/eb130.C failed
for my i686-pc-linux-gnu gcc 3.1 build. The problem was caused by a
call to an undefined destroy() inside
libstdc++-v3/include/ext/stl_hashtable.h's hashtable::_M_delete_node.
I modifying its source code using the attached patch which fixed the
problem but gcc.c-torture/execute/920730-1t.c then failed. It does
not seem that my patch caused the problem.
FAIL: gcc.c-torture/execute/920730-1t.c compilation, -O0
FAIL: gcc.c-torture/execute/920730-1t.c compilation, -O1
FAIL: gcc.c-torture/execute/920730-1t.c compilation, -O2
FAIL: gcc.c-torture/execute/920730-1t.c compilation, -O3 -fomit-frame-pointer
FAIL: gcc.c-torture/execute/920730-1t.c compilation, -O3 -g
FAIL: gcc.c-torture/execute/920730-1t.c compilation, -Os
Would you be willing to look at the patch for correctness?
Thanks,
Jeffrey D. Oldham
oldham@codesourcery.com
Index: stl_hashtable.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/ext/stl_hashtable.h,v
retrieving revision 1.7
diff -c -p -r1.7 stl_hashtable.h
*** stl_hashtable.h 2001/06/27 17:09:53 1.7
--- stl_hashtable.h 2001/07/03 17:04:28
*************** private:
*** 517,523 ****
_Node* __n = _M_get_node();
__n->_M_next = 0;
__STL_TRY {
! construct(&__n->_M_val, __obj);
return __n;
}
__STL_UNWIND(_M_put_node(__n));
--- 517,523 ----
_Node* __n = _M_get_node();
__n->_M_next = 0;
__STL_TRY {
! _Construct(&__n->_M_val, __obj);
return __n;
}
__STL_UNWIND(_M_put_node(__n));
*************** private:
*** 525,531 ****
void _M_delete_node(_Node* __n)
{
! destroy(&__n->_M_val);
_M_put_node(__n);
}
--- 525,531 ----
void _M_delete_node(_Node* __n)
{
! _Destroy(&__n->_M_val);
_M_put_node(__n);
}
More information about the Libstdc++
mailing list