Silverfrost Forums

Welcome to our forums

Mistyping IMPLICIT NONE as IMPLICIT ONE causes ICE

29 Nov 2018 4:54 (Edited: 29 Nov 2018 5:21) #22879

The following test code has NONE incorrectly keyed in as ONE in the second line. FTN95 8.30.279 aborts with an internal compiler error, and this is not affected by /64, /DEBUG, /CHECK, etc.

The code:

program doice
   implicit one       ! <<<=== 'none' mistyped as 'one'
   real :: x
   x=sqrt(3.14159)
   print *,x
end program

The compiler output:

S:\LANG\FTN95>ftn95 /check impone.f90
[FTN95/Win32 Ver. 8.30.279 Copyright (c) Silverfrost Ltd 1993-2018]
0002)    implicit one       ! <<<=== 'none' mistyped as 'one'
*** Internal compiler error

    1 ERROR [impone.F90] - Compilation failed.
29 Nov 2018 5:15 #22880

... and so, for that matter, does

  IMPLICIT OMPLEX (Z)

with presumably all sorts of spelling errors likely to do the same. Perhaps FTN95 no see the problem.

Joking apart, what follows IMPLICIT seems to need to be either NONE or a valid type name.

Eddie

29 Nov 2018 7:05 #22881

Quoted from LitusSaxonicum Joking apart, what follows IMPLICIT seems to need to be either NONE or a valid type name.

Compilers are usually nonchalant when asked to compile text input that is not even program source.

S:\MATH\Luksan\PVAR\ORIG\yy\cull\POL>ftn95 /64 niger.f90
[FTN95/x64 Ver. 8.30.279 Copyright (c) Silverfrost Ltd 1993-2018]
0001) THERE was a young lady of Niger
*** Statement not recognised
0002) Who smiled as she rode on a Tiger;
*** Statement not recognised
0003)   They came back from the ride
*** Statement not recognised
0004)   With the lady inside,
*** Statement not recognised
0005) And the smile on the face of the Tiger.
*** Statement not recognised
*** Missing END statement
    6 ERRORS  [<main program> FTN95 v8.30.279]
*** Compilation failed
30 Nov 2018 7:54 #22883

Thank you for the bug report. I have logged this as needing fixing.

30 Nov 2018 11:20 #22885

Compilers may be nonchalant, but lovers of the limerick won't be with your example, as it isn't good form to use a same ending words for two (or more) rhymes. I thought that you 'program in lowercase' enthusiasts only capitalised function names, which makes the Tiger perhaps miss its (). Tiger in any case doesn't rhyme with Niger (except visually). There aren't all that many real rhymes with tiger - Eiger and Geiger perhaps, making Tiger a poor word choice to end the a lines.

Also, as we don't know about the lady's face, isn't the indefinite article more appropriate than the definite article in respect to the smile?

Also being serious (again, at last), is a statement that begins with something valid but then goes off piste a special case? FTN95 often treats spelling errors quite differently:

0002)    integer, externally :: Mecej4      ! <<<=== 'outside chance?'
*** ':' found after LY where a comma was expected

versus

0002)    integer, eternal :: Mecej4      ! <<<=== 'ever yours'
*** Unknown or missing type declaration attribute specification after ','

These are certainly cases where the first name has been recognised for what it is. In the former, the non-significance of space characters clearly controls the error message generated, but I think that FTN95 would have to be very clever to do better in the latter (and then mark the spot with an x).

Eddie

1 Dec 2018 2:22 (Edited: 3 Dec 2018 10:09) #22898

This turns out to be simply an incorrect error report and not an 'internal compiler error'. The error report has now been changed to 'Unexpected type in IMPLICIT list' for v8.50.

Please login to reply.