From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18807 invoked by alias); 31 Jan 2012 18:28:16 -0000 Received: (qmail 18788 invoked by uid 22791); 31 Jan 2012 18:28:15 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 Jan 2012 18:28:02 +0000 From: "ro at CeBiTec dot Uni-Bielefeld.DE" To: gcc-bugs@gcc.gnu.org Subject: [Bug go/51874] Many libgo testsuite failures on Solaris, IRIX Date: Tue, 31 Jan 2012 19:01:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: go X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: ro at CeBiTec dot Uni-Bielefeld.DE X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ian at airs dot com X-Bugzilla-Target-Milestone: 4.7.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-01/txt/msg03712.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51874 --- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE 2012-01-31 18:27:32 UTC --- > I've still to closer investigate why this happens. I suspect that this > is also the cause of the IRIX failures (a libgo build is currently > running). Maybe this is just and endianess problem: it's interesting > that 32-bit Solaris/x86 works (little-endian), while 32-bit > Solaris/SPARC and IRIX (both big-endian) don't. I see now what's happening, and it's indeed an endianess problem: In runtime/chan.c (__go_send_small), when sending an int (1) on a big-endian system, the __builtin_memcpy copies the 4 low bytes from val (0 in the case of val = 1) into b[], and runtime_chansend copies those to the reciever. Similarly, in __go_receive_small even when a 4-byte int had been received correctly, it would have been placed into the 4 low bytes of u.b by runtime_chanrecv, but the function returns all 8 bytes of u.v (0x10000 in this case). This code cannot possibly work on a big-endian system, but I'm undecided how to solve this in a clean way. Rainer