From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25515 invoked by alias); 19 Feb 2005 23:15:33 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 25482 invoked by alias); 19 Feb 2005 23:15:29 -0000 Date: Sun, 20 Feb 2005 10:17:00 -0000 Message-ID: <20050219231529.25481.qmail@sourceware.org> From: "wilson at specifixinc dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050219212015.20094.jsm28@gcc.gnu.org> References: <20050219212015.20094.jsm28@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug target/20094] gcc.dg/transparent-union-* fail on ia64-hpux X-Bugzilla-Reason: CC X-SW-Source: 2005-02/txt/msg02315.txt.bz2 List-Id: ------- Additional Comments From wilson at specifixinc dot com 2005-02-19 23:15 ------- Subject: Re: gcc.dg/transparent-union-* fail on ia64-hpux pinskia at gcc dot gnu dot org wrote: > ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-19 21:24 ------- > Hmm, Does anyone know how these union are supposed to be passed on ia64-*-hpux, if by referrence > then the warning is correct and the testcase should not be tested on this target. This is an ABI Issue. unions get passed right-aligned little-endian and left-aligned big-endian. Since linux is little-endian, and HPUX is big-endian, only HPUX has a problem here. HPUX defines MEMBER_TYPE_FORCES_BLK to make this work. There are other ways to solve this problem used by other targets, for instance, defining BLOCK_REG_PADDING for HPUX. Getting BLOCK_REG_PADDING to work can be tricky though. It looks like the ia64/hpux.h is the only one that defines MEMBER_TYPE_FORCES_BLK that can trigger this problem, since the others don't trigger on pointer or integer types. It appears that MEMBER_TYPE_FORCES_BLK should not be used for a transparent union, or should be used differently. This check could perhaps be done unconditionally in stor-layout.c. This might be a simple solution. Or maybe we can pass the union/structure type to MEMBER_TYPE_FORCES_BLK and modify the ia64/hpux.h version of the macro to check for the transparent_union attribute. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20094