From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6237 invoked by alias); 12 May 2007 18:41:53 -0000 Received: (qmail 6203 invoked by uid 48); 12 May 2007 18:41:44 -0000 Date: Sat, 12 May 2007 18:41:00 -0000 Message-ID: <20070512184144.6202.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/29286] [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ian at airs dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-05/txt/msg00916.txt.bz2 ------- 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