When compiling the following code the arguments number 7 and furthers are passed per value to the function instead per reference:

```
PROGRAM ERR
IMPLICIT NONE
```

C

INTEGER*4 IND
INTEGER*8 GEO_CALC_ADR, STATUS

C

INTEGER

*4, PARAMETER :: MT = 2*

INTEGER4

INTEGER

& FIRST_COL_OUT(MT),

& FIRST_LIN_OUT(MT),

& NUM_COLS_OUT(MT),

& NUM_LINS_OUT(MT),

& FIRST_COL_IN(MT),

& FIRST_LIN_IN(MT),

& NUM_COLS_IN(MT),

& NUM_LINS_IN(MT),

& FIRST_COL_DEM(MT),

& FIRST_LIN_DEM(MT),

& NUM_COLS_DEM(MT),

& NUM_LINS_DEM(MT)

C

PRINT*, ‘starting’

FIRST_COL_OUT = 0

FIRST_LIN_OUT = 0

NUM_COLS_OUT = 0

NUM_LINS_OUT = 0

FIRST_COL_IN = 0

FIRST_LIN_IN = 0

NUM_COLS_IN = 0

NUM_LINS_IN = 0

FIRST_COL_DEM = 0

FIRST_LIN_DEM = 0

NUM_COLS_DEM = 0

NUM_LINS_DEM = 0

C

IND = 1

PRINT*,‘Calling’

STATUS = GEO_CALC_ADR (FIRST_COL_OUT(IND),FIRST_LIN_OUT(IND),

& NUM_COLS_OUT(IND),NUM_LINS_OUT(IND),

& FIRST_COL_DEM(IND),FIRST_LIN_DEM(IND),

& NUM_COLS_DEM(IND),NUM_LINS_DEM(IND),

& FIRST_COL_IN(IND),FIRST_LIN_IN(IND),

& NUM_COLS_IN(IND),NUM_LINS_IN(IND))

PRINT*,‘End’

END

C

RECURSIVE INTEGER

*8 FUNCTION GEO_CALC_ADR (FIRST_COL_OUT,FIRST_LIN_OUT,*

& NCOLS_OUT,NLINS_OUT,

& FIRST_COL_DEM,FIRST_LIN_DEM,

& NCOLS_DEM,NLINS_DEM,

& FIRST_COL_IN,FIRST_LIN_IN,

& NCOLS_IN,NLINS_IN)

IMPLICIT NONE

INTEGER4

& NCOLS_OUT,NLINS_OUT,

& FIRST_COL_DEM,FIRST_LIN_DEM,

& NCOLS_DEM,NLINS_DEM,

& FIRST_COL_IN,FIRST_LIN_IN,

& NCOLS_IN,NLINS_IN)

IMPLICIT NONE

INTEGER

& FIRST_COL_OUT,

& FIRST_LIN_OUT,

& NCOLS_OUT,

& NLINS_OUT,

& FIRST_COL_DEM,

& FIRST_LIN_DEM,

& NCOLS_DEM,

& NLINS_DEM,

& FIRST_COL_IN,

& FIRST_LIN_IN,

& NCOLS_IN,

& NLINS_IN

C

PRINT*,‘In Function’

FIRST_COL_OUT = 0

FIRST_LIN_OUT = 0

NCOLS_OUT = 0

NLINS_OUT = 0

FIRST_COL_DEM = 0

FIRST_LIN_DEM = 0

NCOLS_DEM = 0

NLINS_DEM = 0

FIRST_COL_IN = 0

FIRST_LIN_IN = 0

NCOLS_IN = 0

NLINS_IN = 0

C

GEO_CALC_ADR = -1

RETURN

END