No stack dump in Fortran code called from C++

No stack dump in Fortran code called from C++

I have a Debug Fortran DLL in which I have turned on all checking (/check:all /fpe:0).  It is called from a C++ driver program.  I am now getting no output (I was without the checks) and I suspect it's because I have an uninitialized variable, however I am not getting any stack dump or any notification of anything wrong.  Perhaps this is switched off in the C++ driver program, any idea how to switch it on?

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Unfortunately, when uninitialized variables are at play, there is no guarantee that a stack trace or any other notification action will occur.

If you can replace the C++ driver with a Fortran driver for debugging purposes, you may improve your chances of finding the problem. There are other compilers that specialize in helping you to hunt for uninitialized variables, and you may consider using them.

If the unitialized variables originate in the C++ program, the preceding remark would not apply. In that case, you may need to add code to the DLL sources in order to validate the input arguments before processing them.

Thanks for the update.  The C++ driver exists and I have to work with it.  No plans to write a Fortran driver.  That said running the case in debugger does stop at the issue although this is manual, would prefer an automated solution.

Leave a Comment

Please sign in to add a comment. Not a member? Join today