This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
GCC STL implementation bug?
- From: apamecha at houston dot geoquest dot slb dot com (Abhisek Pamecha)
- To: bug-lib-g++ at prep dot ai dot mit dot edu, gcc-bugs <gcc-bugs at gcc dot gnu dot org>,abhishek_pamecha at infoys dot com
- Date: Tue, 23 Sep 2003 15:44:01 +0200
- Subject: GCC STL implementation bug?
- Organization: Schlumberger
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