XL Fortran runtime exceptions

The following operations cause runtime exceptions in the form of SIGTRAP signals, which typically result in a "Trace/BPT trap" message:
  • Fixed-point division by zero.
  • Character substring expression or array subscript out of bounds after you specified the -C option at compile time.
  • Lengths of character pointer and target do not match after you specified the -C option at compile time.
  • The flow of control in the program reaches a location for which a semantic error with severity of S was issued when the program was compiled.
  • Floating-point exceptions occur after you specify the appropriate -qflttrap suboptions at compile time.
  • Floating-point operations that generate NaN values and loads of the NaN values after you specify the -qfloat=nanq option at compile time.
  • Calls to the TRAP hardware-specific intrinsic procedure.

If you install one of the predefined XL Fortran exception handlers before the exception occurs, a diagnostic message and a traceback showing the offset within each routine called that led to the exception are written to standard error after the exception occurs. The file buffers are also flushed before the program ends. If you compile the program with the -g option, the traceback shows source line numbers in addition to the address offsets.

You can use a symbolic debugger to determine the error. dbx provides a specific error message that describes the cause of the exception.

Related information:
Also see the following topics:


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us