I am trying to run some old fortran f77 codes. During compilation I get the following errors. I am using gfortran on a 64-bit Ubuntu 14.04 system.
unsteadyf4.f:300.71:
3 IHOL(13)/'8'/, IHOL(14)/'9'/, IHOL(15)/' '/, IHOL(16)/','/,
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
unsteadyf4.f:300.56:
3 IHOL(13)/'8'/, IHOL(14)/'9'/, IHOL(15)/' '/, IHOL(16)/','/,
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
unsteadyf4.f:300.41:
3 IHOL(13)/'8'/, IHOL(14)/'9'/, IHOL(15)/' '/, IHOL(16)/','/,
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
unsteadyf4.f:300.26:
3 IHOL(13)/'8'/, IHOL(14)/'9'/, IHOL(15)/' '/, IHOL(16)/','/,
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
unsteadyf4.f:299.71:
2 IHOL( 9)/'4'/, IHOL(10)/'5'/, IHOL(11)/'6'/, IHOL(12)/'7'/,
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
unsteadyf4.f:299.56:
2 IHOL( 9)/'4'/, IHOL(10)/'5'/, IHOL(11)/'6'/, IHOL(12)/'7'/,
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
unsteadyf4.f:299.41:
2 IHOL( 9)/'4'/, IHOL(10)/'5'/, IHOL(11)/'6'/, IHOL(12)/'7'/,
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
unsteadyf4.f:299.26:
2 IHOL( 9)/'4'/, IHOL(10)/'5'/, IHOL(11)/'6'/, IHOL(12)/'7'/,
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
unsteadyf4.f:298.70:
1 IHOL(5)/'0'/, IHOL( 6)/'1'/, IHOL( 7)/'2'/, IHOL( 8)/'3'/,
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
unsteadyf4.f:298.55:
1 IHOL(5)/'0'/, IHOL( 6)/'1'/, IHOL( 7)/'2'/, IHOL( 8)/'3'/,
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
unsteadyf4.f:298.40:
1 IHOL(5)/'0'/, IHOL( 6)/'1'/, IHOL( 7)/'2'/, IHOL( 8)/'3'/,
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
unsteadyf4.f:298.25:
1 IHOL(5)/'0'/, IHOL( 6)/'1'/, IHOL( 7)/'2'/, IHOL( 8)/'3'/,
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
unsteadyf4.f:297.71:
DATA IHOL( 1)/'+'/, IHOL( 2)/'-'/, IHOL( 3)/'.'/, IHOL( 4)/'E'/,
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
unsteadyf4.f:297.56:
DATA IHOL( 1)/'+'/, IHOL( 2)/'-'/, IHOL( 3)/'.'/, IHOL( 4)/'E'/,
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
unsteadyf4.f:297.41:
DATA IHOL( 1)/'+'/, IHOL( 2)/'-'/, IHOL( 3)/'.'/, IHOL( 4)/'E'/,
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
unsteadyf4.f:297.26:
DATA IHOL( 1)/'+'/, IHOL( 2)/'-'/, IHOL( 3)/'.'/, IHOL( 4)/'E'/,
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
unsteadyf4.f:297.10:
DATA IHOL( 1)/'+'/, IHOL( 2)/'-'/, IHOL( 3)/'.'/, IHOL( 4)/'E'/,
1
Error: Incompatible types in DATA statement at (1); attempted conversion of CHARACTER(1) to INTEGER(4)
All the errors are generated from the following part of the code.
SUBROUTINE INTCOD (IS,NC,ICODE,NERR)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
DIMENSION IS(*),ICODE(*),IHOL(18)
DATA NSYMB/18/
DATA IHOL( 1)/'+'/, IHOL( 2)/'-'/, IHOL( 3)/'.'/, IHOL( 4)/'E'/,
1 IHOL(5)/'0'/, IHOL( 6)/'1'/, IHOL( 7)/'2'/, IHOL( 8)/'3'/,
2 IHOL( 9)/'4'/, IHOL(10)/'5'/, IHOL(11)/'6'/, IHOL(12)/'7'/,
3 IHOL(13)/'8'/, IHOL(14)/'9'/, IHOL(15)/' '/, IHOL(16)/','/,
4 IHOL(17)/'('/
NERR = NERR
DO 200 I=1,NC
DO 100 J=1,NSYMB
IF (IS(I) .NE. IHOL(J)) GO TO 100
ICODE(I)=J
GO TO 200
100 CONTINUE
ICODE(I) = 99
I searched for similar errors, link-1 and link-2 and edited the line DIMENSION IS(*),ICODE(*),IHOL(18)
as DIMENSION IS(*),ICODE(*),4HIHOL(18)
.
Now I get the following errors,
unsteadyf4.f:295.32:
DIMENSION IS(*),ICODE(*),4HIHOL(18)
1
Error: Invalid character in name at (1)
unsteadyf4.f:297.16:
DATA IHOL( 1)/'+'/, IHOL( 2)/'-'/, IHOL( 3)/'.'/, IHOL( 4)/'E'/,
1
Error: Syntax error in DATA statement at (1)
unsteadyf4.f:306.6:
ICODE(I)=J
1
Error: Unclassifiable statement at (1)
unsteadyf4.f:309.6:
ICODE(I) = 99
1
Error: Unclassifiable statement at (1)
Sorry for the long post, I knew the minimal reproductive example, but the code is very large and it is hard to simplify.
Any help would be appreciated.