catching runtime errors with gdb

Paul Brook paul@codesourcery.com
Tue Feb 15 22:56:00 GMT 2005


On Tuesday 15 February 2005 22:45, david serafini wrote:
> If I compile with array bounds checking enabled,
> and it detects an error and writes the message:
>
> Fortran runtime error: array reference out of bounds
>
> how do I catch this in gdb so I can find where in the
> code the error is?

Put a breakpoint on _gfortran_runtime_error. You should be able to do a 
backtrace from there.

Paul



More information about the Fortran mailing list