See the HPFortran Programmer’s Reference, for detailed information about the +FPand +fp_exceptionoptions. Also, the
An illegal instruction exception occurs when a program attempts to execute a bit pattern that is not an
This exception can also occur if your program is linked to a bad library, especially if the library contains code that was written in assembler or if it was corrupted during a file transfer.
This exception may indicate a compiler error. If you cannot find the cause of this exception in your code, contact your HP support representative.
Segmentation violation exceptionBefore a program starts to execute, it is allocated a memory segment, which defines the area of memory that it can use. If the program attempts to access a memory location outside its segment, the operating system will raise the SIGSEGVsignal, indicating a segmentation violation or memory fault.
Any program that can generate address references outside its
Programs that cause a stack overflow (for example, by attempting to allocate more local variables on the stack than the kernel can handle or by infinite recursion) can also cause a segmentation violation. If your program needs a bigger stack, run the System Administrator Manager (SAM) and increase the maxssiz parameter. Also, see the
Segmentation violations are especially common when calling C functions from Fortran program units. If the number, type, or calling conventions of the arguments being passed do not match, the call is likely to result in an exception. For example, if you use the
In most cases, debugging requires locating the code that caused the segmentation violation and rewriting it. If your program aborts with this error, recompile it with the +fp_exceptionoption. A program compiled with this option will display a procedure traceback when it aborts. The procedure traceback lists procedure names and offset addresses of the code that caused the exception.
If you suspect that an
The +check=allalso performs runtime checks for
Handling runtime exceptions 79