This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/32044] [4.3/4.4 Regression] final value replacement too aggressive for e.g. targets with no native div/mod insns
- 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: 10 Dec 2008 21:27:37 -0000
- Subject: [Bug tree-optimization/32044] [4.3/4.4 Regression] final value replacement too aggressive for e.g. targets with no native div/mod insns
- References: <bug-32044-11706@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #55 from steven at gcc dot gnu dot org 2008-12-10 21:27 -------
// This is the test case from PR38453.
// See comment #0 of that bug for further information:
// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38453#c0
typedef struct
{
int lc;
int pb;
} bar;
void foo(bar *propsRes, const unsigned char *propsData)
{
unsigned char prop0;
prop0 = propsData[0];
while (prop0 >= 45) {
propsRes->pb++;
prop0-=45;
}
propsRes->lc = prop0;
}
int main(int argc, char **argv)
{
bar propsRes;
unsigned char propsData[1024];
foo(&propsRes, propsData);
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32044