Silverfrost Forums

Welcome to our forums

Internal Compiler Error

15 Apr 2020 12:11 #25204

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:

   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:

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:

[FTN95/x64 Ver. 8.62.0 Copyright (c) Silverfrost Ltd 1993-2020]
0001)    LOGICAL(4) FUNCTION COMPARE(NB)
*** Internal compiler error
15 Apr 2020 12:28 #25205

Thank you for the feedback. I have made a note of this error.

15 Apr 2020 2:18 #25210

These two failures have now been fixed for the next release of FTN95.

The problem is that FTN95 supports LOGICAL*8 in theory but not always in practice.

Please login to reply.