------- Comment #8 from burnus at gcc dot gnu dot org 2007-02-09 09:55 ------- Hi,
> I cannot judge how much work this would be, but would it be possible to extend > this patch a little further so that these backtraces can be requested by the > user? Well, this is possible if one combines this patch with the ISO C Bindings of our fortran-experiments branch. One could then simply use: integer, parameter :: SIGBUS = 7 integer :: res interface function kill(pid, signal) bind(c, name='kill') use :: ISO_C_BINDING integer(C_INT),value :: pid, signal integer(C_INT),bind(c) :: kill end function kill end interface res = kill(0,SIGBUS) To get a backtrace. Alternatively, with the current patch and the main branch, one only needs to generate somehow SIGSEGV, SIGFPE, SIGILL or SIGBUS. For instance as follows: -ffpe-trap=zero -fbacktrace with r = 0.0 r = 1.0/r which gives a nice backtrace. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30498