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] Fix debug info for expr and jump stmt


On Thu, Oct 25, 2012 at 11:06 AM, Eric Botcazou <ebotcazou@adacore.com> wrote:
>> This patch fixes debug info for expr and jump stmt.
>
> It would be nice to have testcases...

Sure, I'll try to forge some testcases for this.

>
>> * cfgexpand.c (set_expr_location_r): New callback function.
>> (gimple_assign_rhs_to_tree): Walk the expr recursively.
>> (expand_call_stmt): Likewise.
>> (expand_gimple_stmt_1): Likewise.
>
> This cannot be right.  You're going to propagate a toplevel location above
> locations at deeper level that can be different and should prevail.  It would
> be far better to set the right location at node creation instead of patching
> it up during RTL expansion.

I noticed that in r151350, Micheal changed from set_expr_location_r to
SET_EXPR_LOCATION. Any insights why the recursive call is replaced?
Looks to me if we reset the location for first level expr here, there
is no reason that we don't reset expr for deeper levels. Or shall we
simply remove SET_EXPR_LOCATION?

Thanks,
Dehao
>
> --
> Eric Botcazou


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