Silverfrost Forums

Welcome to our forums

Compiler ignores statement with syntax error

9 Mar 2020 4:34 #25063

FTN95 8.51 exhibits a strange behavior when one mistakenly types ':=' instead of '=' (old Algol/Pascal assignment operator). Versions 8.4 and earlier flagged the line as erroneous, but Version 8.51 treats it as a comment line.

program weird
implicit none
integer :: i = 25
!
i := i + i
print *,i
end program

With Version 8.51, the output is

           25

The listing of the program shows the instruction address remaining unchanged on this erroneous line:

   0001   program weird                                                                          AT 0
   0002   implicit none                                                                          AT 20
   0003   integer :: i = 25                                                                      AT 20
   0004   !                                                                                      AT 20
   0005   i := i + i                                                                             AT 20
   0006   print *,i                                                                              AT 20
   0007   end program                                                                            AT 70
10 Mar 2020 8:00 #25071

mecej4

Thanks for the feedback. I have logged this as a bug.

11 Mar 2020 3:08 #25081

This regression has now been fixed for the next release of FTN95.

Please login to reply.