This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: g77 - mips-sgi-irix6.2 - Internal compiler error in function copy _to_mode_reg
- To: law at cygnus dot com
- Subject: Re: g77 - mips-sgi-irix6.2 - Internal compiler error in function copy _to_mode_reg
- From: craig at jcb-sc dot com
- Date: 18 Feb 1999 18:34:57 -0000
- Cc: David dot Billinghurst at riotinto dot com dot au, egcs-bugs at cygnus dot com
- Cc: craig at jcb-sc dot com
- References: <28914.919359192@hurl.cygnus.com>
> In message <19990218102607.30860.qmail@deer>you write:
> > If `-mabi=64' changes type sizes,
>It does.
I'm *pretty* sure that is, to g77, what a tornado is to a house of cards...!
> > though, I think that might explain why
> > g77 is especially prone to bugs in this area. Its system for handling
> > types is especially brittle, partly due to its use of libf2c
> > and the related configuration bits, but mostly due to its
> > internals, which are long-due for a rewrite.
>Actually, it looked like the right thing was done for LEN, which is the one
>I expected to get messed up.
It might be right for some parts of the compiler, but other parts --
like the type of the incoming character-length arg, which is
used for LEN() of a CHARACTER*(*) argument -- might disagree as
a result of this switch changing the "rules" after g77 has already
settled on them during the build.
> > One way to test this hypothesis, if it's possible, is to build
> > the compiler *configured* so it defaults to `-mabi=64'.
>I'm not aware of any such option, but for testing purposes one could take a
>hammer to mips.c.
Tentatively, I'd lean towards suggesting g77 just can't grok
`-mabi=64' unless it is used throughout -- to configure/build/install
the compiler and the libraries. But I don't know the mips-sgi
architecture well-enough to be sure my fears are true, or even
that my guess about what *would* work is true!
>But I don't see how this plays into libf2c -- this is strictly on the compiler
>side.
g77 basically "guesses" at what types libg2c will use for some things,
in the sense that, IIRC, the libg2c configury makes its own guesses,
and they have to agree.
For the length of character strings, g77 and libg2c have to agree
on the type used, because they pass them back and forth to each
other in various contexts. There are other things like this as well,
but this might be to what this particular problem boils down.
(Yeah, I actually edited that last sentence to get rid of the
terminating preposition; the final phrasing just looked cool,
but I've had very little sleep the past day or so. :)
I'd be surprised if g77, in its current brittle form, could be fixed
to handle this without many, many difficulties. I remember what
I went through to get g77 to support Alphas ("mostly" 64-bit systems),
and the fallout is visible in the tremendously crufty code throughout
target.h, among a few other places. (And, I actually *had* a sort-of-
working Alpha system to do development on. I have no mips-sgi
system, and, honestly, with all the installation challenges I've
been dealing with lately, I don't want one, at least for awhile.)
I'm much more hopeful that the planned rewrite will make accommodating
things like `-mabi=64' much easier, though that is also just a guess,
assuming there are no fundamental "gotchas" there. (If it works
for other gcc front ends that have libraries a la libg2c, meaning
they get built separately, then I'd take that as a strong indicator
of no known "gotchas".)
If anyone can point me to, or send me, enough documentation on the
whole mips-sgi architecture/abi stuff, maybe I could at least look
at it and come up with better guesses, if not actual fixes to g77.
But it might be better for everyone if I skipped that step and
got to the rewrite (or, at least, pertinent portions thereof) sooner.
tq vm, (burley)