This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/29286] [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]