Silverfrost Forums

Welcome to our forums

FTN95 and 64 bit OS

29 Dec 2009 12:00 #5615

I am getting a 'Floating Point Stack Fault' run-time error when running an FTN95 compiled program under 64-bit Windows XP and Windows 7. The program works fine with 32-bit version of XP and 7.

When debugging, the Debugger stops at a line in the code, which has no relevance to the error type.

Any solutions on this?

29 Dec 2009 2:32 #5617

Is it possible to reduce the problem to a few lines in a fully working program? If you can post this in the forum then someone may be able to help.

30 Dec 2009 10:56 #5622

Thanks for the prompt response Paul.

It's not possible to reduce the problem to a few lines in a fully working program. The software consists of 1000s of routines in several source files.

What I can do is provide the extended list file complied with EXPLIST option as well as the corresponding source file with subrotuine where the crash occurs for you to have a look.

Is this OK?

31 Dec 2009 7:57 #5627

This kind of error message usually occurs when a function is called without its return type being declared. For example you might have a function named foo returning a integer value whilst the compiler expects it to return a real value if it is not explicitly declared.

This would be trapped by using IMPLICIT NONE and you can set this on the FTN95 command line or you can configure the compiler to use it all the time.

Alternatively you could post a few lines of your Fortran code in the vicinity of the failure.

28 Jan 2010 10:06 #5846

This may be an incidence of an issue we have uncovered relating to the way x64 OSs handle underflows. You would see a floating point stack and the indicated position is not always the one that causes the issue (it can be the next floating point instruction). This can typically happen when a number is converted to an integer.

Would you be willing to test a salflibc for us?

5 Feb 2010 11:59 #5913

Yes.

6 Feb 2010 3:36 (Edited: 15 Jun 2010 4:09) #5918

At first my Fortran example program did not FTN95 link ok on a win 7 quad 64 bit intel box

'Rebuild' returned lines like: <clip> Compilation completed with no errors. Linking... Access violation: ... <clip>

The fix: From the Plato top ruler, 'Project' > 'Properties...' > Debugging > uncheck, at least, all debugging option boxes, including, from 'Checking code' to 'Fail on underflow'. Then click 'Apply to All'

Now rebuild returns: <clip> Compilation completed with no errors. Linking... Creating executable: Release\Win32\myfile.exe Linking completed.

My program example is an F95 main that calls 8 legacy F77 subroutines.

Thanks to all at SilverFrost !!

9 Feb 2010 7:41 #5954

Hello all,

I am also trying to run FTN95 on XP 64 bit. Tried on three different machines, the last one with all new installation. A very simple program like this:

program test1

	real*8 a

	a = 1.00000001d0

	write (*, *) a - 1.0d0

end program test1

gives the following response when compiling either Chekmate, Debug or Release profiles (in this case unchecking all options as mentioned by erom:

Compiling file: test1.f95 Access violation: The instruction at address 00538dfe attempted to write to location 7fff0000 00538da8 allocate_constant_entity(<ptr>structᅣconstant_entity) [+0056]

005355e6 inst_memref(void) [+0373]

00535f3b send_instruction(<ptr>structᅣpending_instruction) [+1a9b]

0053500f complete_emit(void) [+0250]

00534bb5 emitr(enumᅣmachine_instruction,enumᅣcpu_register) [+002a]

0047a60d do_function_top(<ptr>structᅣtree_record) [+0603]

0051e1aa code_generator(<ref>structᅣtree_ptr) [+2022]

00416e11 end_function(int) [+10f0]

eax=7fff0000 ebx=005c1bd4 ecx=00000004 edx=00000000 esi=08af37f4 edi=7fff0000 ebp=0384f2d0 esp=0384f2ac IOPL=0 ds=002b es=002b fs=0053 gs=002b cs=0023 ss=002b flgs=00210206 [NC EP NZ SN DN NV] 0360/2020 TSTK=4 [ ] 00538dfe rep

00538dff movsb

Compilation completed with no errors. Linking... *** Could not open: C:\Documents and Settings\electro\My Documents\FTN95 Examples\Release\Win32\test1.obj

However, it compiles and runs OK on Win7 64 bits!

OSes: Win XP x64 Pro SP2 w/latest updates Win 7 pro with latest updates (same machine, dual boot)

FTN95 personal v 5.40

Any ideas?

Regards,

Fernando

Please login to reply.