From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29908 invoked by alias); 8 Apr 2009 08:40:23 -0000 Received: (qmail 29449 invoked by uid 48); 8 Apr 2009 08:40:01 -0000 Date: Wed, 08 Apr 2009 08:40:00 -0000 Message-ID: <20090408084001.29448.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/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: "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: 2009-04/txt/msg00709.txt.bz2 ------- Comment #21 from rguenth at gcc dot gnu dot org 2009-04-08 08:39 ------- Ah, the key is the complex type! Thus, the following testcase "works" struct Y {}; struct X { Y y; __complex__ float val; }; struct X __attribute__((noinline)) foo (float *p) { struct X x; __real x.val = p[0]; __imag x.val = p[1]; return x; } extern "C" void abort (void); int main() { float a[2] = { 1., 2. }; struct X x = foo(a); if (__real x.val != 1. || __imag x.val != 2.) abort (); return 0; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39678