This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Problems with gcc, g77 on Linux Alpha
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: Problems with gcc, g77 on Linux Alpha
- From: Ray Nachlinger <ray at ultramarine dot com>
- Date: Wed, 8 Sep 1999 17:29:58 -0500 (CDT)
Gentlemen,
I am running gcc and g77 on Linux Alpha and gcc give the following
information.
Reading specs from /usr/lib/gcc-lib/alpha-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
I have found two relatively sever problems here. First, the exp function
in libm seems to think that
exp(-709.)
is a Floating Point Exception instead of 0. Now, I have coded around this
problem in my code, but now I am getting the error from the GL library
when using fog. This seems to attack everywhere.
The second problem is again quite painful. I am using a Fortran
common block as a memory device:
integer a
common/mem/a(2)
..
p = malloc(size)
q = p - loc(a(1))
..
a(q+50) = ...
As best as I can tell you are using integer*4 for relative addressing.
My code has been working correctly on many machines for years, so I
do not have a "simple bug".
The attached program shows both of these problems.
I have not figures out precisely what you are doing, but looking at
the samples program, my guess is that therefore assume you are using
4 byte integers for addressing array elements. I agree that this should
suffice, but you are the guys that allocate the space and I must deal with
it. I cannot, however, without 8 byte relative addresses.
Finally, is there an elegant way to use my own functions as replacements
to those in libm? It seems that most of the routines in libf2c are
no longer used.
I believe that you have all of the information you need, but I will be
happy to supply anything else you require.
Thanks in advance,
Ray
integer*4 p(2)
integer*8 j,k
equivalence (p,j)
integer*1 a(2)
real q
j = 2
k = 35
j = j**k
print *,' p ',p
print *,' j ',j
print *,' loc a ',loc(a)
print *,' loc a+j',loc(a(j))
do 2100 k = 700,750
q = -k
print *,' a exp ',q,exp(q)
2100 continue
end