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: Alexandre Oliva <aoliva at redhat dot com>
- Date: 09 Jan 2001 17:22:05 -0200
- Cc: 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
- Organization: GCC Team, Red Hat
- References: <200101091912.OAA38818@mal-ach.watson.ibm.com>
On Jan 9, 2001, David Edelsohn <dje@watson.ibm.com> wrote:
> The rs6000 port supports both 32-bit and 64-bit computation based
> on a runtime flag. Therefore, the MAX_LONG_TYPE_SIZE is 64 because it can
> attain that value with the appropriate runtime flag. This is necessary
> for 64-bit support.
Geoff was talking about the powerpc-eabi port, that I suppose is a
32-bit-only port.
> I was unaware of your patch until this discussion arose. I think
> that it is a very bad patch and I urge you to revert it.
You can't depend on HOST_WIDE_INT being 32-bits. Build an alpha-x-ppc
cross-compiler and it'll fail, because alpha's long is 64-bits wide.
If the ppc port depends on HOST_WIDE_INT being 32-bits long, the ppc
port is broken. Of course, we may introduce temporary work-arounds,
but, eventually, the port should be fixed so as to work under such
conditions.
Besides, there's a number of tests that fail unless HOST_WIDE_INT is
at least as wide as size_t or ptrdiff_t (I don't recall for sure
which; maybe both). This is what motivated me to write this patch,
and it's working fine on a number of other 32/64-bit targets.
> hwint.h should not be assuming what size HOST_WIDE_INT to use other
> than the maximum, natural host wide int.
And what is the correct definition maximum, natural host wide int? If
a host supports 64-bits integral type, and the target needs one, and
having it will allow GCC to produce correct code while, if no such
64-bits integral type were available, it would crash, why shouldn't we
generate correct code?
The aim is to generate correct code as much as possible (preferably
the same code), regardless of what the host platform is. If the ppc
port relies on having a 32-bit HOST_WIDE_INT, it won't work if hosted
on alpha. To me, this means it's broken and must be fixed. Instead
of urging me to revert the patch, please urge yourself to fix the port
by removing any assumptions on HOST_WIDE_INT not being wider than
32-bits. Such assumptions are deemed to be wrong.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me