public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dje at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/40012] [4.5 Regression] Revision 146817 generated bad debug info for local variables
Date: Tue, 02 Jun 2009 12:51:00 -0000	[thread overview]
Message-ID: <20090602125104.10003.qmail@sourceware.org> (raw)
In-Reply-To: <bug-40012-7796@http.gcc.gnu.org/bugzilla/>



------- Comment #5 from dje at gcc dot gnu dot org  2009-06-02 12:51 -------
cfgexpand.c:expand_used_vars() expands and instantiates virtual-stack-vars for
INSNs when it walks the partion map:

  for (i = 0; i < SA.map->num_partitions; i++)
    {
      tree var = partition_to_var (SA.map, i);

      gcc_assert (is_gimple_reg (var));
      if (TREE_CODE (SSA_NAME_VAR (var)) == VAR_DECL)
        expand_one_var (var, true, true);

It then instantiates the same virtual-stack-vars in debug DECLs when it calls
expand_used_vars_for_block (outer_block, true), which calls

  /* Expand all variables at this level.  */
  for (t = BLOCK_VARS (block); t ; t = TREE_CHAIN (t))
    if (TREE_USED (t))
      expand_one_var (t, toplevel, true);

The INSN var is an SSA_NAME and expand_one_stack_var_at() uses the alignment in
the DECL; the BLOCK var is not an SSA_NAME and the alignment is computed as the
STACK_BOUNDARY.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40012


  parent reply	other threads:[~2009-06-02 12:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-03 22:04 [Bug debug/40012] New: Bad " gcc at magfr dot user dot lysator dot liu dot se
2009-05-03 22:06 ` [Bug debug/40012] " gcc at magfr dot user dot lysator dot liu dot se
2009-05-05 17:09 ` [Bug debug/40012] [4.5 Regression] " pinskia at gcc dot gnu dot org
2009-05-28 14:52 ` rguenth at gcc dot gnu dot org
2009-05-29  3:22 ` [Bug debug/40012] [4.5 Regression] Revision 146817 generated bad " hjl dot tools at gmail dot com
2009-06-01 21:49 ` dje at gcc dot gnu dot org
2009-06-02 12:51 ` dje at gcc dot gnu dot org [this message]
2009-06-02 23:02 ` ppluzhnikov at google dot com
2009-06-03  9:51 ` matz at gcc dot gnu dot org
2009-06-03 13:17 ` ramana at gcc dot gnu dot org
2009-06-03 15:57 ` matz at gcc dot gnu dot org
2009-06-08 11:37 ` matz at gcc dot gnu dot org
2009-06-08 11:38 ` matz at gcc dot gnu dot org
2009-06-27  0:49 ` ppluzhnikov at google dot com
2009-06-27 20:18 ` ebotcazou at gcc dot gnu dot org
2009-06-29 20:11 ` ppluzhnikov at google dot com

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=20090602125104.10003.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).