Retrieving some context from Fortran runtime errors
Tobias Burnus
burnus@net-b.de
Sat Sep 13 09:19:00 GMT 2008
Hi all,
>> Fortran runtime error: Attempt to DEALLOCATE unallocated memory.
>>
>> However, as it doesn't segfaults nor dumps core, I cannot find which
>> DEALLOCATE is the culprit. How could I find it?
I think gfortran should also print the file & line number
(at least when using a special option such as -g). Thus I filled an
enhancement request at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37507
Somehow the debugger method or the definitions cpp like
# define ALLOCATE(x, size) allocate(x, stat=global_alloc_err); \
if(global_alloc_err.ne.0) call alloc_error((size), __FILE__, __LINE__)
are not good solutions.
Tobias
More information about the Fortran
mailing list