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 

Failure to detect undefined variable in a common block

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



Joined: 31 Oct 2006
Posts: 1884

PostPosted: Tue Jan 10, 2023 12:34 pm    Post subject: Failure to detect undefined variable in a common block Reply with quote

In the following program, one of the variables in a COMMON block is used before it has been defined.

Code:
!
      program buggy
      implicit none
      external blkd
      integer i,j,k,l,m,n
      common /bb/i,j,k,l,m,n
      integer ksum
      ksum = i+j+k+l+m+n
      print *,k,ksum
      end program
!
      block data blkd
      implicit none
      integer i,j,k,l,m,n
      common /bb/i,j,k,l,m,n
      data i,j,l,m,n/1,2,4,5,6/  !k is not defined
      end
!

Compiling with /undef in a 32-bit compilation yields an EXE that when run displays the error.

With /64 /undef, however, the error goes undetected.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue Jan 10, 2023 1:04 pm    Post subject: Reply with quote

mecej4

Thank you for the bug report which I have logged for investigation.
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 Nov 20, 2023 11:41 am    Post subject: Reply with quote

mecej4

It turns out that /UNDEF has not been implemented for BLOCK DATA and 64 bit programming. This was presumably because of the complexities of handling this for 64 bits and the understanding that BLOCK DATA is rarely used.

I have been informed that there are no immediate plans to implement this feature and I will change the documentation to reflect this.
Back to top
View user's profile Send private message AIM Address
mecej4



Joined: 31 Oct 2006
Posts: 1884

PostPosted: Tue Nov 21, 2023 2:07 pm    Post subject: Reply with quote

Thanks, Paul. I understand that it can be difficult to support debugging code with old features, such as BLOCKDATA, for which modern alternatives are available.
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 -> 64-bit 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