public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/43051]  New: [4.5 Regression] VTA causes a stack living parameter unavailable in most of the function
@ 2010-02-12 13:27 jakub at gcc dot gnu dot org
  2010-02-12 13:28 ` [Bug debug/43051] " jakub at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-02-12 13:27 UTC (permalink / raw)
  To: gcc-bugs

static void __attribute__((noinline))
foo (const char *x, long long y, int z)
{
  asm volatile ("" : : "r" (x), "r" ((int) y), "r" (z) : "memory");
}

typedef struct S
{
  struct S *n;
  int v;
} *P;

P
bar (P c, int v, P e)
{
  register int si asm ("esi"), di asm ("edi"), bx asm ("ebx");
  asm volatile ("" : "=r" (si), "=r" (di), "=r" (bx));
  while (c < e)
    {
      foo ("c", (unsigned int) c, 0);
      foo ("v", v, 0);
      foo ("e", (unsigned int) e, 0);
      if (c->v == v) return c;
      foo ("c", (unsigned int) c, 0);
      foo ("v", v, 0);
      foo ("e", (unsigned int) e, 0);
      c++;
    }
  asm volatile ("" : : "r" (si), "r" (di), "r" (bx));
  return 0;
}

at -g -O2 -m32 makes c unavailable in most of the function, while the c var is
for the whole time living in the parameter stack slot.  GCC 4.4.x and earlier
emit correct location info in this case.


-- 
           Summary: [4.5 Regression] VTA causes a stack living parameter
                    unavailable in most of the function
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: wrong-debug
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org
GCC target triplet: i686-linux


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


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2010-03-16 10:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-12 13:27 [Bug debug/43051] New: [4.5 Regression] VTA causes a stack living parameter unavailable in most of the function jakub at gcc dot gnu dot org
2010-02-12 13:28 ` [Bug debug/43051] " jakub at gcc dot gnu dot org
2010-02-12 13:48 ` jakub at gcc dot gnu dot org
2010-02-12 14:05 ` jakub at gcc dot gnu dot org
2010-02-12 16:45 ` jakub at gcc dot gnu dot org
2010-02-12 17:02 ` jakub at gcc dot gnu dot org
2010-02-15 12:21 ` jakub at gcc dot gnu dot org
2010-02-15 14:10 ` jakub at gcc dot gnu dot org
2010-02-15 16:13 ` jakub at gcc dot gnu dot org
2010-02-22 17:10 ` jakub at gcc dot gnu dot org
2010-02-22 17:23 ` jakub at gcc dot gnu dot org
2010-02-22 18:17 ` jakub at gcc dot gnu dot org
2010-02-22 19:21 ` jakub at gcc dot gnu dot org
2010-03-16 10:52 ` jakub at gcc dot gnu dot org
2010-03-16 10:53 ` jakub at gcc dot gnu dot org

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).