replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Possible bug
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 

Possible bug

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



Joined: 12 Oct 2016
Posts: 167

PostPosted: Sat Jun 21, 2025 6:51 pm    Post subject: Possible bug Reply with quote

Whenever I try to compile the following subroutine (32bit or 64bit, v9.12.0), I am getting
Code:

 subroutine test_regression    ()
    REAL, ALLOCATABLE   :: AIN(:)

    nk = 1
         ALLOCATE(AIN(NK), stat=IST)
     DEALLOCATE(AIN(NK), stat=IST)
     
end subroutine



0048d5c4 make_nullify_tree(struct�tree_ptr,enum�logical,enum�logical) [+01ce]
0048ac84 process_allocate(int,<ref>struct�tree_ptr)#26 [+12ee]
0048cb1c handle_allocate(int,<ptr>char,int) [+06ff]
004111eb parse_executable_statement(<ptr>char,int,<ref>int) [+32a8]
004156d4 handle_token(<ptr>char,int,int,int,int,<ref>int) [+1230]
0040627a ProcessEntireLine(void) [+06c8]
004071fa compile(<ptr>char) [+016f]
0040181d main [+058e]
Code:
Code:
Back to top
View user's profile Send private message
StamK



Joined: 12 Oct 2016
Posts: 167

PostPosted: Sat Jun 21, 2025 6:53 pm    Post subject: Reply with quote

This is my Windows version
OS Name: Microsoft Windows 11 Home
OS Version: 10.0.26100 N/A Build 26100
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sun Jun 22, 2025 7:00 am    Post subject: Reply with quote

StamK

Thank you for the bug report which is a regression in FTN95 at v9.12.
This has now been fixed for the next release.
Back to top
View user's profile Send private message AIM Address
StamK



Joined: 12 Oct 2016
Posts: 167

PostPosted: Sun Jun 22, 2025 9:15 am    Post subject: Reply with quote

Would it be possible to have updated EXE/DLLs in the support page? Thanks
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sun Jun 22, 2025 9:19 am    Post subject: Reply with quote

Yes. As it happened I did that before seeing your request.
Back to top
View user's profile Send private message AIM Address
StamK



Joined: 12 Oct 2016
Posts: 167

PostPosted: Sun Jun 22, 2025 5:19 pm    Post subject: Reply with quote

Confirmed fixed!
Back to top
View user's profile Send private message
KennyT



Joined: 02 Aug 2005
Posts: 320

PostPosted: Tue Aug 26, 2025 8:40 am    Post subject: similar issue? MODULE declared and compiled separately Reply with quote

Compile this 3 line module separately, then comment it out before compiling the main program with /undef.
Code:

!ftn95$free
module testmod
    real*8, allocatable :: dshfts(:), deps(:)
end module testmod

    program test
   
    USE testMOD

       if( allocated(dshfts)) deallocate (dshfts, STAT=IST)
       if( allocated(deps)) deallocate (deps, STAT=IST)
       
    vnull=-9.9e20
    nkk = 7875
   

    allocate (dshfts(nkk), stat=ist); dshfts=vnull
    allocate (deps(nkk), stat=ist); deps=vnull
   
    WRITE(*,*) "ok"
   
    end program


make sure that your mod_path is looking in the local folder first

then
slink
lo objfilename
file

sdbg exefilename

if you hover over the "dshfts" on line 13, what do you see?

if it shows the array as "REAL*8(subscripts not valid)" then the ALLOCATED test (or the DEALLOCATE) gives an error (usually Access violation) when you step over.

if you uncomment the module code then compile the whole file with /undef and repeat the slink/sdbg, what do you see when you hover over the DSHFTS array:

If it's anything like what I'm seeing, the the hover description is now:

"unassigned [real*8 (Subscripts not valid)]

and the test passes and the program completes OK.

So, my question is:

what is the difference between a MODULE declared in the same source file that it is used in and

a MODULE that is compiled separately from the source code where it is used?

NOTE THAT ONLY SEEMS TO BE A PROBLEM WITH 32-BITS. 64BITS SEEMS TO BE OK?

K
Back to top
View user's profile Send private message Visit poster's website
Robert



Joined: 29 Nov 2006
Posts: 458
Location: Manchester

PostPosted: Tue Aug 26, 2025 8:38 pm    Post subject: Reply with quote

I'll have a look at this when I am back from my holiday
Back to top
View user's profile Send private message Visit poster's website
KennyT



Joined: 02 Aug 2005
Posts: 320

PostPosted: Wed Aug 27, 2025 7:42 am    Post subject: Reply with quote

I think i may have sussed my error.

if you only load the main object file in slink and don't specify to load the module object as well, then it fails at runtime.

if you include loading the module object code, then it all works!

D-oh!

K
Back to top
View user's profile Send private message Visit poster's website
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