This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Set correct source location for deallocator calls
On 2012-08-10 20:38, Dehao Chen wrote:
> + // { dg-final { scan-assembler "1 28 0" } }
This test case isn't going to work except with dwarf2, and with gas.
You can use -dA so that you can scan for file.c:line. There are
other examples in the testsuite.
This doesn't belong in guality. It belongs in g++.dg/debug/.
It would be nice if you could add a java testcase to see that it
doesn't regress.
> ! record_in_goto_queue_label (struct leh_tf_state *tf, treemple stmt,
> tree label,
> ! location_t location)
BTW, for the future, please fix your mailer to not wrap lines.
> + /* For call expressions inside FINALL/CATCH block, if its location
> + is unknown, gimplify_call_expr will set it to input_location.
> + However, these calls are automatically generated to destructors.
> + And they may be cloned to many places. In this case, we will
> + set the location for them in tree-eh.c. But to ensure that EH
> + does the right job, we first need mark their location as
> + UNKNOWN_LOCATION. */
> + input_location = UNKNOWN_LOCATION;
I'll quibble with the wording here. It reads as if we want to force
all calls to have UNKNOWN_LOC, whereas all we want is to prevent any
calls that already have UNKNOWN_LOC from gaining input_loc via gimplify_call_expr.
r~