This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/14627] [tree-ssa] extra assignment inserted
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Mar 2004 16:07:47 -0000
- Subject: [Bug optimization/14627] [tree-ssa] extra assignment inserted
- References: <20040318034843.14627.dann@godzilla.ics.uci.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From steven at gcc dot gnu dot org 2004-03-23 16:07 -------
This way it's a bit smaller:
int foo (int *a, int b)
{
int i;
int one_valid = 0;
for (i = 0; i < 10; i++)
{
if (*a && b)
goto done;
else
if (!one_valid && *a)
one_valid = 1;
}
done:
return one_valid;
}
When you replace "int *a" with just "int a", the extra assignment isn't there.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14627