interaction with gprof

Salvatore Filippone filippone.salvatore@gmail.com
Mon Nov 18 15:40:00 GMT 2013


My profile example also gives the wrong name with trunk. So it seems
to be a long-standing issue

On Mon, Nov 18, 2013 at 4:35 PM, Janus Weil <janus@gcc.gnu.org> wrote:
>> I vaguely remember problems with getting proper backtraces into
>> internal subroutines (which occurred to me a couple of times, but
>> never bothered me enough to take action). That's very probably
>> related.
>
> OTOH, at least a simple example seems to work with current gfortran
> (see below), so either the backtrace problem has been fixed or I was
> just fantasizing (or maybe the problem was with ifort?) ...
>
> Cheers,
> Janus
>
>
>
> $ cat bt.f90
> module m
>
> contains
>
>   subroutine s1
>     call s2()
>   contains
>     subroutine s2
>       call abort()
>     end
>   end
>
> end
>
> program p
> use m
> call s1()
> end
>
> $ gfortran-4.9 -g3 bt.f90
> $ ./a.out
>
> Program aborted. Backtrace:
> #0  0x7F7A9CE947D7
> #1  0x7F7A9CE95F32
> #2  0x7F7A9CF61588
> #3  0x4006CA in s2 at bt.f90:9
> #4  0x4006D3 in __m_MOD_s1 at bt.f90:6
> #5  0x4006DE in p at bt.f90:17
> Aborted (core dumped)



More information about the Fortran mailing list