I want to compile the slatec library downloaded at netlike.org. I wrote a simple Makefile to compile all routines. However, I get an error when compiling the **mach.f files like d1mach.f that contain the machine specific values. The error occurs only when I (as I should, if I understand the description correctly) uncomment the values for my machine (intel). If I don't do this, the compilation doesn't create an error, but the routine dsos doesn't work, i.e. the iteration doesn't start but instead it always evaluated the test function at the starting point.
The error message:
src/d1mach.f:85:37:
EQUIVALENCE (DMACH(5),LOG10(1))
1
Error: Expecting a comma in EQUIVALENCE at (1)
make: *** [obj/d1mach.o] Error 1
I guess the reason is If a variable name is also a function name (15.5.1), that name must not appear in the list.
what I found under point 8.2.1 in the Fortran77 Standard.
Anyone, ever had this issue and solved it?
EDIT:
The short version of d1mach.f is:
DOUBLE PRECISION FUNCTION D1MACH (I)
C
INTEGER SMALL(4)
INTEGER LARGE(4)
INTEGER RIGHT(4)
INTEGER DIVER(4)
INTEGER LOG10(4)
C
DOUBLE PRECISION DMACH(5)
SAVE DMACH
C
EQUIVALENCE (DMACH(1),SMALL(1))
EQUIVALENCE (DMACH(2),LARGE(1))
EQUIVALENCE (DMACH(3),RIGHT(1))
EQUIVALENCE (DMACH(4),DIVER(1))
EQUIVALENCE (DMACH(5),LOG10(1))
C
C
DATA DMACH(1) / Z'0010000000000000' /
DATA DMACH(2) / Z'7FEFFFFFFFFFFFFF' /
DATA DMACH(3) / Z'3CA0000000000000' /
DATA DMACH(4) / Z'3CB0000000000000' /
DATA DMACH(5) / Z'3FD34413509F79FF' /
C
C
IF (I .LT. 1 .OR. I .GT. 5) CALL XERMSG ('SLATEC', 'D1MACH',
+ 'I OUT OF BOUNDS', 1, 2)
C
D1MACH = DMACH(I)
RETURN
C
END