From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28864 invoked by alias); 5 Jun 2007 16:20:40 -0000 Received: (qmail 28393 invoked by uid 48); 5 Jun 2007 16:20:27 -0000 Date: Tue, 05 Jun 2007 16:20:00 -0000 Message-ID: <20070605162027.28392.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: "rguenth at gcc dot gnu dot org" 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-06/txt/msg00286.txt.bz2 ------- Comment #166 from rguenth at gcc dot gnu dot org 2007-06-05 16:20 ------- It causes a 10% performance regression for tramp3d. There appear to be no significant changes in libstdc++ performance testing. "Fixing" tramp3d-v4 with the below patch cures the performance regression. --- tramp3d-v4.cpp 2007-05-16 15:02:47.000000000 +0200 +++ tramp3d-v4x.cpp 2007-06-05 18:11:40.000000000 +0200 @@ -29583,10 +29583,6 @@ VectorEngine() { PoomaCTAssert<(ElementProperties::hasTrivialDefaultConstructor && ElementProperties::hasTrivialDestructor && ElementProperties::concrete)>::test(); - for (int i = 0; i < D; ++i) - { - ElementProperties::construct(&x_m[i]); - } } inline VectorEngine(const VectorEngine&); template (ElementProperties::construct calls placement new) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29286