mecej4
Joined: 31 Oct 2006 Posts: 1886
|
Posted: Wed Apr 15, 2020 1:11 pm Post subject: Internal Compiler Error |
|
|
The following code requires the /alt option since it uses a kind number of 4 for a function of type Logical. If the option is specified, FTN95 Version 8.62 compiles it fine. If the option is left out, instead of a meaningful error message we see strange responses.
The code:
Code: | LOGICAL(4) FUNCTION COMPARE(NB)
IMPLICIT NONE
CHARACTER(15)::LIST(6)
CHARACTER(*)::NB
INTEGER(4)::I
DATA (LIST(I),I=1,6)/'Hidrógeno','Helio','Litio','Berilio','Boro','Carbono'/
COMPARE=.FALSE.
DO I=1,6
IF(INDEX(TRIM(NB),TRIM(LIST(I)))>0) THEN
COMPARE=.TRUE.
ENDIF
ENDDO
END FUNCTION |
Without any options, we see:
Code: | R:\lang>ftn95 logifn.f90
[FTN95/Win32 Ver. 8.62.0 Copyright (c) Silverfrost Ltd 1993-2020]
0010) DO I=1,6
*** Operand incompatible with opcode
*** Invalid machine instruction generated |
With /64, we see:
Code: | [FTN95/x64 Ver. 8.62.0 Copyright (c) Silverfrost Ltd 1993-2020]
0001) LOGICAL(4) FUNCTION COMPARE(NB)
*** Internal compiler error |
|
|