From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25015 invoked by alias); 18 May 2007 06:27:13 -0000 Received: (qmail 24673 invoked by alias); 18 May 2007 06:26:49 -0000 Date: Fri, 18 May 2007 06:27:00 -0000 Message-ID: <20070518062649.24672.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: "mark at codesourcery 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/msg01388.txt.bz2 ------- Comment #80 from mark at codesourcery dot com 2007-05-18 07:26 ------- Subject: Re: [4.0/4.1/4.2/4.3 Regression] placement new does not change the dynamic type as it should ian at airs dot com wrote: > ------- Comment #78 from ian at airs dot com 2007-05-18 07:14 ------- > The test case in comment #73 is just a standard aliasing violation. You are > casting a double* to an int* and writing to it both ways. I'm confused. The double-ness looks irrelevant to me; it could just as well be "void *". The only actual accesses to the memory are through an "int *" pointer and a "long *" pointer, and there's a placement new between the two. I thought the whole point of these patches was to allow placement new to change the type in exactly this way? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286