This topic provides some guidelines for locating the cause of exceptions and run-time errors. Intel Fortran run-time error messages do not usually indicate the exact source location causing the error.
To locate the cause of errors, use the various compiler options to isolate programming errors at compile time and run-time or use the debugger to locate the cause of exceptions:
The -check keyword options generate extra code to catch certain conditions at run time. For example, specify the -check bounds option to generate code to perform run-time checks on array subscript and character substring expressions. An error is reported if the expression is outside the dimension of the array or the length of the string. The -check noformat and -check nooutput_conversion options reduce the severity level of the associated run-time error to allow program continuation. For more information on these options, refer to the Compiler Options reference.
The -ftrapuv option is useful in detecting uninitialized variables. It sets uninitialized local variables that are allocated on the stack to a value that is typically interpreted as a very large integer or an invalid address. References to these variables, which are not properly initialized by the application, are likely to cause run-time errors that can help you detect coding errors.
The -traceback option allows program counter to source file line correlation, which simplifies the task of locating the cause of severe run-time errors. Without -traceback, you could try to locate the cause of the error using a map file and the hexadecimal addresses of the stack displayed when a severe error occurs.
The -fpe option controls the handling of floating-point arithmetic exceptions (IEEE arithmetic) at run time. For example, if you specified -fpe3, exceptions related to exceptional IEEE values are not reported and your application may generate exceptional IEEE values, which later in your application may cause an exception or unexpected values. If you recompile the application at -fpe0, any exceptional IEEE values generated will cause the program to terminate and report an error message earlier.