On Jun 20, 2012, Jakub Jelinek <ja...@redhat.com> wrote:

> On Wed, Jun 20, 2012 at 12:39:29AM -0300, Alexandre Oliva wrote:
>> When promote_debug_loc was first introduced, it would never be called
>> with a NULL loc list.  However, because of the strategy of temporarily
>> resetting loc lists before recursion introduced a few months ago in
>> alias.c, the earlier assumption no longer holds.

>> This patch adusts promote_debug_loc to deal with this case.

> The thing I'm worried about is what will happen with -g0 in that case.
> If the loc list is temporarily reset, it will be restored again,
> won't that mean that for -g0 we'll then have a loc that is in the
> corresponding -g compilation referenced by a DEBUG_INSNs only (and thus
> non-promoted)?

I don't see how.  If we get to a NULL loc list, it means it's not the
first time we visit that node (it was visited upstack), so if it needed
promotion, it would have already been promoted then.

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist      Red Hat Brazil Compiler Engineer

Reply via email to