From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29730 invoked by alias); 15 Apr 2003 00:56:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 29708 invoked by uid 71); 15 Apr 2003 00:56:00 -0000 Resent-Date: 15 Apr 2003 00:56:00 -0000 Resent-Message-ID: <20030415005600.29707.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, amodra@bigpond.net.au Received: (qmail 28903 invoked by uid 48); 15 Apr 2003 00:46:37 -0000 Message-Id: <20030415004637.28902.qmail@sources.redhat.com> Date: Tue, 15 Apr 2003 00:56:00 -0000 From: amodra@bigpond.net.au Reply-To: amodra@bigpond.net.au To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: target/10408: Two powerpc64 ABI incompatibilities in passing structures by value X-SW-Source: 2003-04/txt/msg00657.txt.bz2 List-Id: >Number: 10408 >Category: target >Synopsis: Two powerpc64 ABI incompatibilities in passing structures by value >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: wrong-code >Submitter-Id: net >Arrival-Date: Tue Apr 15 00:56:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Alan Modra >Release: All current 3.x gcc branches >Organization: >Environment: >Description: The testcase below shows a couple of bugs in the way gcc handles passing structures by value. The powerpc64 ABI states that "The first eight doublewords mapped to the parameter save area are never stored in the parameter save area by the calling function. Instead, these doublewords are passed in registers..." Bug1: The testcase shows gcc passing the structure on the stack in the -mstrict-align case. This also happens for structures of sizes 3,5,6,7 bytes without -mstrict-align. Bug2: -mstrict-align affects argument padding. With -mstrict-align, the arg is padded upward in its slot, without, the arg is padded downward. Thus objects compiled with -mstrict-align are incompatible with objects compiler with -mno-strict-align. >How-To-Repeat: cat >m.c <Fix: In progress. >Release-Note: >Audit-Trail: >Unformatted: