This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/32445] New: no debug information for loop counters
- From: "geoffk at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jun 2007 01:24:31 -0000
- Subject: [Bug debug/32445] New: no debug information for loop counters
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
In this short program, on i386-darwin (probably all i386),
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;
}
when compiled with -O1 -g, there is no location information for 'i', despite it
being in %ecx. This is because ivopts has replaced 'i' with a variable with
exactly the same value but a different name, breaking the debug information.
--
Summary: no debug information for loop counters
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
GCC target triplet: i386-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32445