This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/32618] std::vector calls uneccessary constructors instead of inplace construction of first object
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Jul 2007 00:52:40 -0000
- Subject: [Bug libstdc++/32618] std::vector calls uneccessary constructors instead of inplace construction of first object
- References: <bug-32618-11420@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-07-04 00:52 -------
> The optimization I am suggesting would produce the following [approximate]
is wrong. You have to bind a constant reference to a temp variable and then
doing a copy as you do a[0] = b;
So the optimization for resize is wrong and incorrect.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32618