Silverfrost Forums

Welcome to our forums

Compiler bug

18 Nov 2016 1:31 #18429

Given this stripped-down source, the FTN95 compiler V8.05 fails in 32-bit mode, but works in 64-bit mode.

     subroutine wr_val_e4 (val, str, n) 
     real    :: val
     character :: str*(*) 
     integer*8 :: v, ten = 10
     integer :: n, z = ichar ('0') 
! 
     v = abs(val)
     str(n:n) = char (mod(v,ten)+z) 
     return 

   end subroutine wr_val_e4 

The error messages are

0008)      str(n:n) = char (mod(v,ten)+z)
*** Operand incompatible with opcode
*** Invalid machine instruction generated
19 Nov 2016 9:16 #18433

Thank you for the bug report. I have logged it a a bug that needs fixing.

26 Jan 2017 10:20 #18771

This has now been fixed for the next release.

Please login to reply.