Silverfrost Forums

Welcome to our forums

FTN95 8.10 false error report of undefined variable

10 Feb 2018 9:24 #21386

The following program is a shortened version of a larger program (Hompack90) in which the same mysterious runtime error was generated when I compiled and ran it with FTN95 8.10 32- or 64-bit), with /check /debug.

program salbugx
   implicit none
   integer :: y(6) = (/ 1, 2, 3, 4, 5, 6 /)
   integer :: n = 5
   integer :: q(6)
!
   call tang(y,q,n)
   print *,q(:n)

contains
   subroutine tang(y, q, n)
   implicit none
   integer n,np1
   integer :: q(n+1),y(:)
!
   np1 = n+1
   call f(y(2:np1), q(1:n))
   return
   end subroutine tang

   subroutine f(x, v)
   implicit none
   integer, intent(in) :: x(:)
   integer, intent(out) :: v(:)
   integer :: n
!
   n = size(x)
   v(1) = product(x) - 1
   v(2:n) = sum(x) - (n+1) + x(2:n)
   return
   end subroutine f

end program

The output from the program with the /check /debug options:

Runtime error from program:s:\homp\tbed\buga1.exe
Run-time Error
 *** Error   15, Attempt to access undefined argument to routine

 SALBUGX~F -  in file buga1.f90 at line 28 [+00d9]
 SALBUGX~TANG -  in file buga1.f90 at line 17 [+00e0]
 SALBUGX -  in file buga1.f90 at line 7 [+0075]

In reality, the variables used are all defined, and the expected output from the program is:

          719          17          18          19          20
12 Feb 2018 9:47 #21392

mecej4

Many thanks for the feedback. It turns out that this is still presented as a false error report for 32 bits. For 64 bits it runs correctly correctly for me which may mean that the v8.20 release is OK but I have only tested with v8.20 of the compiler and not the corresponding clearwin64.dll. Either way the issue appears to have been fixed for 64 bits.

12 Mar 2018 1:53 #21606

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

Please login to reply.