This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/18431] Code for arrays and pointers are not the same
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Nov 2004 20:39:46 -0000
- Subject: [Bug tree-optimization/18431] Code for arrays and pointers are not the same
- References: <20041111180852.18431.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-11 20:39 -------
Rewritting the code this way, shows how we ahould be optimizing the code:
void h()
{
int i;
unsigned short *q1 = q;
for (i=0;i<last+NOSB;i++)
{
*q1 = 0;
q1++;
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18431