This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: [Patch, Fortran] PR 47797 - Improve line number for debugging


On 02/20/2011 05:55 AM, Tobias Burnus wrote:
For a local variable such as
character(len=:), allocatable :: str2
the code for generating the initial nullifying (and the final deallocation)
happens at the end of procedures, thus input_location points to the last line.

This leads to strange locations if one does debugging. Before the patch, one has:

character(kind=1)[1:3] * str2;

[test.f90 : 6] try
{
[test.f90 : 6] str2 = 0B; /* This is the break point. */
[test.f90 : 4] [test.f90 : 4] __builtin_memcpy /* str1 = '1234'. */


With the patch:


[hj4.f90 : 6] try
{
[hj4.f90 : 3] str2 = 0B;
[hj4.f90 : 4] [hj4.f90 : 4] __builtin_memcpy ...


Build and currently regtesting on x86-64-linux. OK for the trunk?

Tobias

PS: I have not tested all combinations; I think there is room for improvement
and I hope that I have not introduced location regressions.

I hope so too. OK for Trunk.


Jerry


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