[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
gcc-bugzilla@gcc.gnu.org
Fri Feb 12 13:27:00 GMT 2010
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
More information about the Gcc-bugs
mailing list