 |
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
mecej4
Joined: 31 Oct 2006 Posts: 1840
|
Posted: Tue Jan 10, 2023 12:34 pm Post subject: Failure to detect undefined variable in a common block |
|
|
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 |
|
 |
PaulLaidler Site Admin

Joined: 21 Feb 2005 Posts: 7774 Location: Salford, UK
|
Posted: Tue Jan 10, 2023 1:04 pm Post subject: |
|
|
mecej4
Thank you for the bug report which I have logged for investigation. |
|
Back to top |
|
 |
PaulLaidler Site Admin

Joined: 21 Feb 2005 Posts: 7774 Location: Salford, UK
|
Posted: Mon Nov 20, 2023 11:41 am Post subject: |
|
|
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 |
|
 |
mecej4
Joined: 31 Oct 2006 Posts: 1840
|
Posted: Tue Nov 21, 2023 2:07 pm Post subject: |
|
|
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 |
|
 |
|
|
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
|