When compiling C++ with the -fdump-tree-gimple option (GCC 4.6.1), I get code that has the following function in it:
std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = int, _Alloc = std::allocator<int>] (struct _Vector_base * const this)
{
int * D.8482;
long int D.8483;
int * D.8484;
long int D.8485;
long int D.8486;
long int D.8487;
long unsigned int D.8488;
int * D.8489;
struct _Vector_impl * D.8490;
{
try
{
D.8482 = this->_M_impl._M_end_of_storage;
D.8483 = (long int) D.8482;
D.8484 = this->_M_impl._M_start;
D.8485 = (long int) D.8484;
D.8486 = D.8483 - D.8485;
D.8487 = D.8486 /[ex] 4;
D.8488 = (long unsigned int) D.8487;
D.8489 = this->_M_impl._M_start;
std::_Vector_base<int, std::allocator<int> >::_M_deallocate(this, D.8489, D.8488);
}
finally
{
D.8490 = &this->_M_impl;
std::_Vector_base<int, std::allocator<int>::_Vector_impl::~_Vector_impl (D.8490);
}
}
<D.8393>:
}
You can get this code by making a simple program that uses std::vector<int>
. In any case, the part of the code I do not understand is the line with D.8487 = D.8486 /[ex] 4;
. I looked at the source code for /usr/include/c++/4.6.1/std_vector.h
, and its destructor is a one-liner that calls _M_deallocate
. Does anyone know what the operator /[ex]
stands for? The only thing I have noticed so far is that the RHS operand is the size of the type the vector parameterizes over.
/[ex]
means that it's an exact divide expression.From the GCC internals manual: