This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: f77 on sco5 fails on GOTOFF references


On Wed, Dec 31, 1997 at 01:05:34AM -0600, Robert Lipe wrote:
> > The RS/6000 had a similar bug a couple years back.  Fortran was trying
> > to compute the address of a constant, something which C never did.

This is exactly what is trying to happen.

> I probably should have used "interesting" instead of "odd".  After I 
> looked at the problem more, I decided it was just lameness in the native
> assembler.   I've filed a problem report with SCO on it.

It is not an SCO assembler bug.  If anything, it is a GAS bug, since
it should have reported an error.  To push the address of a constant
with -fpic, we must use a lea/pushl combination -- just the pushl is
not valid.

I believe the problem to be between LEGITIMATE_PIC_OPERAND_P and the
pushl "i" constraint, and the fact that the i386 backend lies to gcc
about how pic really works.  If the later were fixed (big overhaul),
I'm sure many things would work much better.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]