The following code:
SUBROUTINE rdgenc_purp(jyr)
INTEGER,INTENT(IN) :: jyr
INTEGER,PARAMETER :: JAYEAR=803,JBYEAR=804,LXTZN=1714,
& MXNSEW=4,MXNCOT=4
REAL, DIMENSION(1:lxtzn,1:lxtzn,1:mxnsew,1:mxncot,JAYEAR:JBYEAR)
& :: gchowkswcoyr
gchowkswcoyr(:,:,:,:,jyr) = 1.0E05
ENDSUBROUTINE
compiled thus:
ftn95 rdgenc_purp.for /64 /defint_kind 3 /deflog_kind 1 /no_com /optimise /im /mod_path \source\mods /cfpp /define DEBUG 0
produces the following compiler message in v8.51:
[FTN95/x64 Ver. 8.51.0 Copyright (c) Silverfrost Ltd 1993-2019]
Licensed to: Alistair Halls
Organisation: David Simmonds Consultancy
0005) REAL, DIMENSION(1:lxtzn,1:lxtzn,1:mxnsew,1:mxncot,JAYEAR:JBYEAR)
0006) & :: gchowkswcoyr
WARNING - Variable GCHOWKSWCOYR has been given a value but never used
*** Internal compiler error - floating point exception
1 ERROR [rdgenc_purp.FOR] - Compilation failed.
Entirely possible that a) there are issues with the code, b) there are issues with the compiler options or c) both of the above...
NB the subroutine this is taken from is much larger, with various other USE and INCLUDE statements. The purpose is to read a specific subset of a data file, according to the parameters in the array which is causing the issue.