+++ This bug was initially created as a clone of Bug #29649 +++
Running an application I got the following error 
Fortran runtime error: Attempt to allocate negative amount of memory.  Possible
integer overflow

This is not very helpful in debugging, as it gives no clue as to where in the
code it occurred. It would be extremely helpful to have a way to force a
backtrace produced, either explicitly via stderr (as Intel Fortran does for
code compiled with -traceback), or implicitly by producing a core dump.
------------

The core dump has been implemented in bug #29649.

A draft patch, containing both the now-checked in core dumping and the
traceback can be found at http://gcc.gnu.org/ml/fortran/2006-11/msg00634.html

That patch calls the addr2line to translate the address to the file/line
number.  The library used by addr2line cannot be used as it is GPL. (Cf. PR
5773 for gcj.)

FX wrote in the initial PR:
"It was mentionned on IRC tonight that Daniel Berlin has a library that
extracts
line and file information from DWARF2 info. It's internal to Google, but he
said he'll see if he can get it released. We'll have to get back to him in some
time..."


-- 
           Summary: Support traceback (backtrace) on errors
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org
 BugsThisDependsOn: 29649


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30498

Reply via email to