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 

corrupt object module when compiling huge program with debug
Goto page Previous  1, 2
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
ljfarrugia



Joined: 06 Jun 2016
Posts: 35

PostPosted: Fri Dec 10, 2021 12:20 pm    Post subject: Reply with quote

Dear mecej4
Thats very strange. I took that code and it compiles, links and runs without error. If compiled with /undef/debug it fails of course, because the variables in the module have not been explicitly initialised.
Louis
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Fri Dec 10, 2021 12:41 pm    Post subject: Reply with quote

Please state your compiler version, compiler options used, contents of FTN95.CFG and, if not building from the command line, the procedure followed.

I tried several versions of FTN95 (6.35, 7.1, 7.2, 8.65, 8.82) and all of them gave an access violation similar to the following (attempt to read from location 00000000):

Code:
Runtime error from program:c:\lang\ftn95v882\ftn95.exe
Access Violation
The instruction at address 0045e0f6 attempted to read from location 00000000

 0045de7e process_binary_module(<ptr>void,enum─logical)#1D [+0278]
 0045f296 process_use_stmt(<ptr>char,<ref>int) [+02ff]
 0040bedd parse_declaration_statement(<ptr>char,int,int,<ref>int) [+2c61]
 00414237 handle_token(<ptr>char,int,int,int,int,<ref>int) [+0ea3]
 00405ff0 ProcessEntireLine(void) [+06d2]
 00406f7a compile(<ptr>char) [+016f]
 0040181d main [+058e]
 0059a3ce SALFStart [+06ff]
Back to top
View user's profile Send private message
ljfarrugia



Joined: 06 Jun 2016
Posts: 35

PostPosted: Fri Dec 10, 2021 12:54 pm    Post subject: Reply with quote

I'm using FTN95 ver 8.82.0 with command line
ftn95 *.f /link or
ftn95 *.f /link/debug
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Fri Dec 10, 2021 1:16 pm    Post subject: Re: Reply with quote

ljfarrugia wrote:
I'm using FTN95 ver 8.82.0 with command line
ftn95 *.f /link or
ftn95 *.f /link/debug


This is getting confusing!

The last example that I gave, in the 12th response, starting "The limitation...", is in free form, so you should have given the file an "f90" suffix. Secondly, the compiler will not accept the compile and link commands with *.f or *.f90 as the file(s) to use unless you give it an unambiguous name for the output EXE file, and at least one file exists with the specified suffix.

[code]s:\lang\ftn95\tbed>dir
Volume in drive S is RAMDISK
Volume Serial Number is D208-C000

Directory of s:\lang\ftn95\tbed

11/29/2021 11:17 AM <DIR> .
11/29/2021 11:17 AM <DIR> ..
12/10/2021 06:07 AM 231 xcom3.f
1 File(s) 231 bytes

s:\lang\ftn95\tbed>ftn95 *.f90 /link
[FTN95/Win32 Ver. 8.82.0 Copyright (c) Silverfrost Ltd 1993-2021]
*** *.f90 does not match any source files

s:\lang\ftn95\tbed>ftn95 *.f /link
[FTN95/Win32 Ver. 8.82.0 Copyright (c) Silverfrost Ltd 1993-2021]
*** /LINK and /LINK_MAP require an explicit file name when a wildcard source file name is used
Back to top
View user's profile Send private message
ljfarrugia



Joined: 06 Jun 2016
Posts: 35

PostPosted: Fri Dec 10, 2021 1:27 pm    Post subject: Reply with quote

I can confirm that with 6.35 I get the same result as yourself, but with 8.0 and 8.82 I have no problem
Back to top
View user's profile Send private message
ljfarrugia



Joined: 06 Jun 2016
Posts: 35

PostPosted: Fri Dec 10, 2021 1:30 pm    Post subject: Reply with quote

sorry for the confusion I meant I used the command line ftn95 *.f90
My code is still in 77 format rather than f90, so that's my default
Back to top
View user's profile Send private message
ljfarrugia



Joined: 06 Jun 2016
Posts: 35

PostPosted: Fri Dec 10, 2021 1:33 pm    Post subject: Reply with quote

Of course I had to rename the file in your post and I used the actual name I had given it and not *.f90
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Fri Dec 10, 2021 2:18 pm    Post subject: Reply with quote

And what was that actual name? That is rather important, considering what has been discussed earlier in this thread regarding reserved device names.
Back to top
View user's profile Send private message
ljfarrugia



Joined: 06 Jun 2016
Posts: 35

PostPosted: Fri Dec 10, 2021 2:37 pm    Post subject: Reply with quote

I called it test1.f90
so the command line calls were
ftn95 test1.f90 /link or
ftn95 test1.f90 /link/debug

I trust this is unambiguous.
Louis
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Fri Dec 10, 2021 2:59 pm    Post subject: Reply with quote

I renamed the file to "test1.f90" and tried the four combinations of /64 and /debug. In every case the compiler crashed with an attempt to read from location 00000000.

At this point it would be useful if other forum readers could try the same tests and tell us what they find.
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Sat Dec 11, 2021 2:04 am    Post subject: Reply with quote

I compiled mecej4's example in Plato
I had gFortran selected for /64 and the response in errorlog was:

test_com.f90:5:15:
5 | end module com3
| 1
Fatal Error: Cannot open module file 'com3.mod0' for writing at (1): No such file or directory

compilation terminated.

FTN95 needs to trap this possible error
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sat Dec 11, 2021 2:25 pm    Post subject: Reply with quote

FTN95 has now been fixed for the next release so that the failure to create the file COM3.mod will generate an error report.

If there are other outstanding issues in this thread the please let me know,
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
Goto page Previous  1, 2
Page 2 of 2

 
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