View previous topic :: View next topic |
Author |
Message |
ljfarrugia
Joined: 06 Jun 2016 Posts: 35
|
Posted: Fri Dec 10, 2021 12:20 pm Post subject: |
|
|
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 |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1891
|
Posted: Fri Dec 10, 2021 12:41 pm Post subject: |
|
|
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 |
|
|
ljfarrugia
Joined: 06 Jun 2016 Posts: 35
|
Posted: Fri Dec 10, 2021 12:54 pm Post subject: |
|
|
I'm using FTN95 ver 8.82.0 with command line
ftn95 *.f /link or
ftn95 *.f /link/debug |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1891
|
Posted: Fri Dec 10, 2021 1:16 pm Post subject: Re: |
|
|
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 |
|
|
ljfarrugia
Joined: 06 Jun 2016 Posts: 35
|
Posted: Fri Dec 10, 2021 1:27 pm Post subject: |
|
|
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 |
|
|
ljfarrugia
Joined: 06 Jun 2016 Posts: 35
|
Posted: Fri Dec 10, 2021 1:30 pm Post subject: |
|
|
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 |
|
|
ljfarrugia
Joined: 06 Jun 2016 Posts: 35
|
Posted: Fri Dec 10, 2021 1:33 pm Post subject: |
|
|
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 |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1891
|
Posted: Fri Dec 10, 2021 2:18 pm Post subject: |
|
|
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 |
|
|
ljfarrugia
Joined: 06 Jun 2016 Posts: 35
|
Posted: Fri Dec 10, 2021 2:37 pm Post subject: |
|
|
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 |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1891
|
Posted: Fri Dec 10, 2021 2:59 pm Post subject: |
|
|
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 |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2556 Location: Sydney
|
Posted: Sat Dec 11, 2021 2:04 am Post subject: |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7933 Location: Salford, UK
|
Posted: Sat Dec 11, 2021 2:25 pm Post subject: |
|
|
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 |
|
|
|