[Bug libstdc++/29286] [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should
pcarlini at suse dot de
gcc-bugzilla@gcc.gnu.org
Fri May 4 11:04:00 GMT 2007
------- Comment #43 from pcarlini at suse dot de 2007-05-04 12:03 -------
(In reply to comment #42)
> this happens in hot tramp3d loops and is a quite common idiom for initializing
> storage. To fix this we need to avoid creating the asm if the type of the
> original storage is the same as the other.
Many thanks Richard. Indeed, I find this already mentioned optimization a very
sensible thing to add.
(By the way, someone should tell the tramp3d developers that using placement
new for a POD type like double isn't a very smart idea ;) The only tricky point
for default inizialization is whether using memset or a plain loop)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286
More information about the Gcc-bugs
mailing list