[gfortran,patch] Allow backtracing non-library errors

FX Coudert fxcoudert@gmail.com
Sun Aug 5 11:56:00 GMT 2007


> Program received signal SIGFPE, Arithmetic exception.
> 0x080485ea in MAIN__ () at u3.f90:3
> 3          x = sqrt(x)
> Current language:  auto; currently fortran

It's really weird, cause it's not the same address as you had with  
your first post:

> $ cat u3.f90
>    real :: x
>    x = -1
>    x = sqrt(x)
>    print *, x
>    end
> $ gfortran -g  -fbacktrace -ffpe-trap=invalid u3.f90 && ./a.out
>
> Program received signal 8 (SIGFPE): Floating-point exception.
>
> Backtrace for this error:
>   + /lib/i686/cmov/libc.so.6 [0xb7ce1208]
>   + /lib/i686/cmov/libc.so.6(__libc_start_main+0xe0) [0xb7ccd030]

Could you try to do both tests with the same executable, setting  
GFORTRAN_ERROR_BACKTRACE=1 when run without gdb?

Thanks,
FX



More information about the Fortran mailing list