Given the following short program,
struct pt
{
int x, y;
};
struct pt sum(struct pt *p)
{
struct pt tmp = { 0, 0 };
int i;
for (i = 0; i < 100; i++)
{
tmp.x += p[i].x;
tmp.y += p[i].y;
}
return tmp;
}
on powerpc-darwin, built with -O2, I see that the main loop is storing tmp.x in
r8 and tmp.y in r10 (or possibly the other way around). Yet, the debug
information contains no location information for 'tmp'. A similar thing
happens on i386-darwin where the values are stored in eax and edx.
Also, on i386-darwin, 'i' is also not present in the debug information,
although it is in %ecx.
L2:
addl -8(%esi,%ecx,8), %eax
addl -4(%esi,%ecx,8), %edx
addl $1, %ecx
cmpl $101, %ecx
jne L2
--
Summary: missing debug information for structure components
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: geoffk at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32444