This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC build failed with your patch on 2001-01-09T11:35:00Z.
- To: David Edelsohn <dje at watson dot ibm dot com>
- Subject: Re: GCC build failed with your patch on 2001-01-09T11:35:00Z.
- From: Jeffrey A Law <law at redhat dot com>
- Date: Tue, 09 Jan 2001 14:47:35 -0700
- cc: Alexandre Oliva <aoliva at redhat dot com>, Geoff Keating <geoffk at redhat dot com>, rth at redhat dot com, gcc at gcc dot gnu dot org, gcc-regression at gcc dot gnu dot org, grahams at redhat dot com, jsm28 at cam dot ac dot uk, mhayes at redhat dot com, neil at daikokuya dot demon dot co dot uk, osk at hem dot passagen dot se, Mark Mitchell <mark at codesourcery dot com>
- Reply-To: law at redhat dot com
In message <200101091939.OAA28600@mal-ach.watson.ibm.com>you write:
> >>>>> Alexandre Oliva writes:
>
> Alexandre> Besides, there's a number of tests that fail unless HOST_WIDE_IN
> T is
> Alexandre> at least as wide as size_t or ptrdiff_t (I don't recall for sure
> Alexandre> which; maybe both). This is what motivated me to write this pat
> ch,
> Alexandre> and it's working fine on a number of other 32/64-bit targets.
>
> This patch isn't even an optimization, it is a trade-off.
But fundamentally, you need HOST_WIDE_INT to be at least as wide as size_t
or ptdiff_t for the target. That's a correctness issue. [ HOST_WIDE_INT must
also be no less than 1/2 the size of the largest integer type the target is
supporting. ]
One way to deal with it is to make HOST_WIDE_INT be a larger type. That
seems pretty simple. Furthermore, targets can't handle that are broken.
Of course we don't want to widen HOST_WIDE_INT unless it's really
necessary for correct operation on the target we're compiling for.
Another way to deal with this is to remove the assumption that HOST_WIDE_INT
is as wide as size_t or ptrdiff_t. This may be a better long term solution,
then again it may not. I would think this carries more risk than widening
HOST_WIDE_INT.
The former solution would at first glance seem to be the safer and simpler
solution and would be my choice were I in Alex's position right now.
Now it turns out we've got a broken port. So what is the best way to
1. Fix Alex's problem -- and --
2. Get the PPC work working again.
?
jeff