GCC STL implementation bug?
Abhisek Pamecha
apamecha@houston.geoquest.slb.com
Tue Sep 23 14:43:00 GMT 2003
Abhishek Pamecha wrote:
> I am not sure where to mail a possible g++ STL bug so I am sending it to
> this list. Please pardon if this was irritating.
>
> g++ -v
> Reading specs from /usr/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.0.2/specs
> Configured with: ./configure
> Thread model: single
> gcc version 3.0.2
>
> stl version g++-v3
>
> Here I try to reverse a vector and append to itself. It fails
> mysteriously if the vectors's size intially is more than 17 and
> adds junk to the last element in the new vector.
> So if the initial vector is
> 1 2 3 4
> and the desired output is
> 1 2 3 4 3 2 1
> but the actual output is
> 1 2 3 4 3 2 <junk>
>
> this happens ONLY if the vector's initial size is > 17.
>
> Attached is a demo file FYR.
>
> Please feel free to contact me in case you need more info.
>
> thanks
> Abhishek
>
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test_vec.cc
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20030923/077027a2/attachment.cc>
More information about the Gcc-bugs
mailing list