From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8416 invoked by alias); 7 Apr 2009 14:03:57 -0000 Received: (qmail 5516 invoked by uid 48); 7 Apr 2009 14:03:41 -0000 Date: Tue, 07 Apr 2009 14:03:00 -0000 Message-ID: <20090407140341.5514.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/39678] std::transform is incorrect with std::multiples and bind2nd for complex In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "diepen at astron dot nl" 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: 2009-04/txt/msg00611.txt.bz2 ------- Comment #2 from diepen at astron dot nl 2009-04-07 14:03 ------- The output does not show the correct results. It looks as if the imaginary part of the complex number in the bind2nd object is incorrect. When debugging the bind2nd object was constructed correctly, but when used in std::transform its value was incorrect, in particular the imaginary part seems to be uninitialized (as also reported by valgrind). As I said, this only happens for complex, not for complex. Originally I used my own Multiplies functor to multiply a float vector with a complex value and that failed similarly. But it appears to happen for the simpler case as shown in my test program too. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39678