public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Maxim Kuvyrkov <maxim@codesourcery.com>
To: Richard Guenther <richard.guenther@gmail.com>
Cc: GCC <gcc@gcc.gnu.org>, Jason Merrill <jason@redhat.com>,
	  Jan Hubicka <jh@suse.cz>
Subject: Re: [RFA] dwarf2out.c:eliminate_regs() bug
Date: Thu, 08 Oct 2009 11:51:00 -0000	[thread overview]
Message-ID: <4ACDCB1C.5010007@codesourcery.com> (raw)
In-Reply-To: <84fc9c000909200432p7a3235e0n3a80c63d4fc918cb@mail.gmail.com>

Richard Guenther wrote:
...
> Yes, though we should probably try to catch the DECL_ABSTRACT case
> further up the call chain - there shouldn't be any location lists for abstract
> function.  Thus, see why
> 
> static dw_die_ref
> gen_formal_parameter_die (tree node, tree origin, dw_die_ref context_die)
> ...
>       if (! DECL_ABSTRACT (node_or_origin))
>         add_location_or_const_value_attribute (parm_die, node_or_origin,
>                                                DW_AT_location);
> 
> the node_or_origin of the param isn't DECL_ABSTRACT.  In the end the
> above check should have avoided the situation you run into.

The origin_or_origin (== origin) turned out to be 'this' pointer.  It 
came from BLOCK_NONLOCALIZED_VARs in decls_for_scope():

static void
decls_for_scope (tree stmt, dw_die_ref context_die, int depth)
{
...
    for (i = 0; i < BLOCK_NUM_NONLOCALIZED_VARS (stmt); i++)
      process_scope_var (stmt, NULL, BLOCK_NONLOCALIZED_VAR (stmt, i),
                         context_die);
...
}

set_decl_abstract_flags() doesn't seem to process 
BLOCK_NONLOCALIZED_VARs.  From what I gather, this is correct behavior.

At this point I got the feeling that something is clobbering the 
information.  There is this patch by Honza 
(http://gcc.gnu.org/viewcvs/trunk/gcc/dwarf2out.c?r1=151901&r2=151917) 
that fixes a clobbering issue with abstract functions.  Backporting it 
to my sources fixed the problem, yay!

Honza, does the bug you've fixed with the above patch resemble the 
problem I've stumbled into?

Regards,

--
Maxim K.

      reply	other threads:[~2009-10-08 11:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-20  7:38 Maxim Kuvyrkov
2009-09-20  9:03 ` Richard Guenther
2009-09-20 11:18   ` Maxim Kuvyrkov
2009-09-20 11:32     ` Richard Guenther
2009-10-08 11:51       ` Maxim Kuvyrkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ACDCB1C.5010007@codesourcery.com \
    --to=maxim@codesourcery.com \
    --cc=gcc@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=jh@suse.cz \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).