Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Craig Burley <burley@gnu.org>
To: axp-list@redhat.com
Subject: Re: Should axp integers be long int?..was: fmt.c line 95 segfaults
Date: Thu, 16 Apr 1998 20:17:55 -0400 (EDT)	[thread overview]
Message-ID: <199804170017.UAA25221@melange.gnu.org> (raw)

[Apologies if this has already been addressed...apparently I was
removed from the list, probably due to a bounce happening,
sometime in the past two weeks.]

>> I see that integers are defined differently
>> for the libf2c runtime code by these two
>> versions.  My questions at this point are:
>> 1.  Should integers be "long int" on the alpha?
>
>They should not.  Even only if tons of Fortran code assume that
>INTEGER and INTEGER*4 are the same thing (is this a Standard
>requirement?  I do not have relevant documents on hand.)

No, it is not a standard requirement.  I think the default being
INTEGER*4 simply caters to people's expectations based on 32-bit
systems, their existing unformatted I/O files, and so on; no
particular reason why a Fortran compiler can't default INTEGER and
REAL to 64 bits, as long as DOUBLE PRECISION is thus 128 bits
(though whether you actually *get* additional precision is
not something the standard says much about! ;-).

>> 2. How are pointers defined?
>
>????  Why this matters?  Adresses on Alpha happen to be 8-bytes wide.

g77 has some relevant write-ups on its attempts to cater to
people trying to write 32/64-bit portable code using extensions
to Fortran like %LOC (aka LOC()).  E.g. INTEGER(KIND=7), IIRC.

So you can currently ask g77 to make an INTEGER variable wide
enough to hold a %LOC-style pointer, FWIW.  Matters for some
things, like calling SIGNAL, for example.

>Still I wonder why this bug shows up again, and again, and ...

Yeah, so do I.  I'm not fully up on this stuff (my Alpha is still
sitting around, taken apart, awaiting my spending more time looking
for reasons the SCSI subsystem doesn't work, etc., while I work
on g77 0.5.23.)  If/when my Alpha is back up and happy building
gcc/egcs for me, I'll look into these things, but I suspect someone
else (in the egcs community) will beat me to this and other bugs.

        tq vm, (burley)


             reply	other threads:[~1998-04-17  0:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-17  0:17 Craig Burley [this message]
     [not found] <199803301732.MAA01231@melange.gnu.org>
1998-04-10 19:56 ` Should axp integers be long int?..was: fmt.c line 95 segfaults Robert Williams
1998-04-10 20:20   ` Michal Jaegermann
1998-04-11 10:52   ` Toon Moene
1998-04-14 11:50   ` Loic Prylli
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox