forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FTN95 8.10 false error report of undefined variable

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
mecej4



Joined: 31 Oct 2006
Posts: 1884

PostPosted: Sat Feb 10, 2018 10:24 pm    Post subject: FTN95 8.10 false error report of undefined variable Reply with quote

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.

Code:
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:

Code:
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:

Code:
          719          17          18          19          20
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Mon Feb 12, 2018 10:47 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7912
Location: Salford, UK

PostPosted: Mon Mar 12, 2018 2:53 pm    Post subject: Reply with quote

This has now been fixed for the next release of FTN95.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group