When I enable "Generate Interface Blocks" option, I really get a lot of compilation errors stating that actual argument and expected parameter types do not match. Does this mean we can be sure that the problem is not originating from floating point stack corruption ? I added the "check floating point stack" option and ran again, however I did not receive any errors. It would really help if we could see a complete test case.Īctually I am trying to preapare a test case, but it is really difficult to catch the error when I do not use all the project files as a whole. I also notice that the option "Generate Interface Blocks is NOT enabled. If you get an access violation when running with this on, this will indicate that the floating point stack has become corrupted. I suggest adding the option Fortran > Floating Point > Check Floating Point Stack > Yes. The array temporary message is just a performance warning. If(retValue = true) // will not work as intended
#Cutviewer mill invalid floating point operation code
Upon return of "true" if your subsequent code uses
(and calling convention screws-up stack pointer again)Īnd be careful about the return value. RetB = fortranCall(&B) // *** not passing address of B *** RetA = fortranCall(&A) // calling convention screws-up stack pointer If the Fortran subroutine is not using the same calling convention it will be likely that you have corrupted the stack.
What is the value of the pointer to p at the time of error? (not the value pointed to by p)Īlso, I believe you want extern "C" for calling convention (caller cleans up stack) as opposed to _stdcall. Then if the other values within the function remain constant for the duration of the application the only variable is the pointer to p.