BUG IN THE FORTRAN COMPLILER
BTP408 at DBTHRZ5.BITNET
BTP408 at DBTHRZ5.BITNET
Sat Feb 4 17:26:50 AEST 1989
Date: 2-FEB-1989 19:17:09.51
From: BTP408 AT DBTHRZ5
To: UBT0::BITNET::"INFO-IRIS at BRL.MIL"
Subj: BUG IN THE FORTRAN COMPLILER
DEAR SGI-USERS,
YOU CAN SAVE SOME DAYS OF WORK BY READING THIS MESSAGE.
C THERE IS AN ERROR IN THE FORTRAN COMPILER
C IF THE "ENTRY" STATEMENT IS USED. SUM3 AND
C SUM ARE NOT EQUAL?
C ==========================================
READ(*,*) A,B
SUM = GI8(A)+GI8(B)
A1 = GI8(A)
A2 = GI8(B)
SUM3 = A1 + A2
WRITE(*,*) ' SUM = ', SUM
WRITE(*,*) ' BUT IT SHOULD BE ', SUM3
WRITE(*,*) ' AND NOT ', A2
END
C ==========================================
FUNCTION GI1(A)
GI1 = 0.
RETURN
C
ENTRY GI8(A)
GI8 = 1.*SIN(A)
C IF GI8 = SIN(A) IT WORKS, OR ALTERNATIVELY IF
C GI8 IS DECLARED AS A FUNCTION.
RETURN
END
WE HAVE THIS PROGRAM RUNNING WITH WRONG RESULTS ON A 4D70 AND A 4D20 (IRIX 3.1).
THERE ARE NO PROBLEMS ON A VAX. IF SOMEONE OF THE SGI-PEOPLE IS READING
THIS, PLEASE DELETE THIS BUG IN THE NEXT VERSION OF THE FORTRAN COMPILER AND
GIVE ME A SHORT REPLY.
EBERHARD
E. BODENSCHATZ
THEORETISCHE PHYSIK II
UNI BAYREUTH
8580 BAYREUTH
WEST GERMANY
BTP408 AT DBTHRZ5.BITNET
More information about the Comp.sys.sgi
mailing list