This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/16187] New: extra casts to unsigned int generated for array references
- From: "dann at godzilla dot ics dot uci dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Jun 2004 00:17:08 -0000
- Subject: [Bug middle-end/16187] New: extra casts to unsigned int generated for array references
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The .vars dump for this function:
int f1(int * data, int j)
{
return data[j];
}
looks like:
return *((int *)((unsigned int)j * 4) + data);
The cast to "unsigned int" is probably not needed, emitting it increases the
number of statements generated, so it probably increases the memory consumption
and the amount of work the optimizers have to perform.
--
Summary: extra casts to unsigned int generated for array
references
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dann at godzilla dot ics dot uci dot edu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16187