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 

Unreasonable warning message

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

PostPosted: Sat Oct 27, 2018 2:49 pm    Post subject: Unreasonable warning message Reply with quote

Given the program
Code:
Subroutine Sub(n,nb,g,ag,ind)
implicit none
integer :: n, nb, ind
integer, intent(in) :: g(n), ag(n*n)
!
integer :: i,k, kn
!
      ind = 0
  l2: Do k = 1, nb - 1
         kn = k * n - n
         Do i = 1, n
            If (g(i) /= ag(kn+i)) Cycle l2
         End Do
         ind = k
         Go To 3
      End Do l2
      ind = 1
3     nb = nb - 1

    print *,'Ind = ',ind
    return
End subroutine Sub

a 32-bit compilation with /opt produces the warning:
Code:
[FTN95/Win32 Ver. 8.30.279 Copyright (c) Silverfrost Ltd 1993-2018]
0001) Subroutine Sub(n,nb,g,ag,ind)
WARNING - This statement will never be executed
    NO ERRORS, 1 WARNING  [<SUB> FTN95 v8.30.279]

In this instance it is easy to ignore the warning, but I have seen similar warnings with the statement being named as "will never be executed" being an executable statement (I can provide such an example, but it is much longer than the short example that I gave above).
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sat Oct 27, 2018 4:19 pm    Post subject: Reply with quote

Yes. There are a number of situations where this false warning is given particularly with the new 64 bits. This is a known issue but I will make a note of this particular case.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Nov 08, 2018 5:43 pm    Post subject: Reply with quote

I have not been able to reproduce this issue when using the latest internal version of FTN95 so hopefully it has already been fixed in a different context.
Back to top
View user's profile Send private message
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