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: [patch] PR debug/58123: Set correct location for TRY blocks


On 02/19/15 10:31, Aldy Hernandez wrote:
[Ughh...I'm apparently incapable of CCing gcc-patches on the first try.
  My apologies again.]

Please see the long explanation in the PR:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58123

But the short explanation for this patch is that, at the very least, we
should fix the location of the GIMPLE_TRY_FINALLY.  Currently  we're
preferring the input_location, instead of the location of the
TRY_FINALLY_EXPR.

An incorrect GIMPLE_TRY_FINALLY location causes the location of
location-less FINALLY statements to also have an incorrect location,
causing an inconsistent debugging experience.

As explained in the PR, I would ideally like to get rid of the kludge
where we set the location of location-less FINALLY statements to be that
of the TRY statement, but that may be by design, and/or beyond the scope
of this fix.

Tested on x86-64 Linux.

OK for mainline?




curr


commit 119b6f5c628831706ac8fa26a906d80cf996bbe3
Author: Aldy Hernandez<aldyh@redhat.com>
Date:   Wed Feb 18 13:31:41 2015 -0800

     	PR debug/58123
     	* gimplify.c (gimplify_expr): Prefer location of TRY_FINALLY_EXPR
     	over input_location.
testsuite/
	* g++.dg/debug/dwarf2/deallocator.C: Adjust for correct try
	location.
	* g++.dg/gcov/gcov-2.C: Likewise.
OK.
Jeff


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