This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/20094] gcc.dg/transparent-union-* fail on ia64-hpux
- From: "wilson at specifixinc dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Feb 2005 23:15:29 -0000
- Subject: [Bug target/20094] gcc.dg/transparent-union-* fail on ia64-hpux
- References: <20050219212015.20094.jsm28@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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