This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/29286] [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should
- From: "ian at airs dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 May 2007 18:41:44 -0000
- Subject: [Bug libstdc++/29286] [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should
- References: <bug-29286-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #54 from ian at airs dot com 2007-05-12 19:41 -------
Regarding comment #51: I think the code is OK. What it does is, at the RTL
level, make the two types alias each other for the entire function. This is
different from what was happening on comment #47; that patch was making the two
types alias at that specific point in the program. At the tree level we want
to alias specific pointers, and the new patch retains that. It would be nice
to do that at the RTL level also, but we unfortunately have no mechanism for
that. So people who use placement new with different types, neither of which
is char*, may see some optimization regression in some cases, because the
scheduler will be more constrained than is really required. I don't see a way
to avoid that. I also don't think it's very important.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286