This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran,patch] Allow backtracing non-library errors


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]