This is the mail archive of the
mailing list for the GCC project.
Re: need help with 176.gcc from SPEC CPU2000 on LP64 with GCC 3
- From: Richard Henderson <rth at redhat dot com>
- To: Janis Johnson <janis187 at us dot ibm dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 12 Feb 2002 16:49:29 -0800
- Subject: Re: need help with 176.gcc from SPEC CPU2000 on LP64 with GCC 3
- References: <20020212103239.A1905@us.ibm.com>
On Tue, Feb 12, 2002 at 10:32:39AM -0800, Janis Johnson wrote:
> When I build 176.gcc from SPEC CPU2000 on ia64-unknown-linux-gnu, no
> matter what options I use, it gets a segv in memset called from
> life_analysis. Has anyone successfully run this benchmark in an LP64
> environment using GCC 3.x? If so, would you please let me know which
> extra flags you used and anything else you needed to do? The SPEC web
> site has a config file used for Alpha, but I didn't recognize anything
> else as IA64 and the Alpha configuration didn't seem to do anything
My guess is that it's a missing prototype problem.
IA-64 has a stupid ABI in which "int" is passed in the low 32 bits
of a 64-bit register, and the upper 32 bits are undefined. Alpha,
on the other hand, requires that 32-bit values be sign-extended.
I remember that this came up compiling perl from spec95, but don't
recall the exact situation to give you an example of how aggressive
gcc can be wrt eliding "unnecessary" sign and zero extensions, but
the general form of the failure will be
int t = pointer subtration
where foo is not properly prototyped and foo actually takes e.g. a
size_t argument. With the prototype in place, the caller will
properly sign/zero extend the argument. Without, you get garbage.