[Bug tree-optimization/26629] tree load PRE does not work on array references
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Mar 10 12:50:00 GMT 2006
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-03-10 12:50 -------
Here is another testcase:
typedef long dtype;
typedef dtype longarray[];
int g (longarray *array1, unsigned long i, dtype j)
{
if (!(*array1)[i])
i++;
if (j < (*array1)[i])
h();
return i;
}
int g1 (longarray *array1, unsigned long i, dtype j)
{
dtype a = (*array1)[i];
if (!a)
{
i++;
a = (*array1)[i];
}
if (j < a)
h();
return i;
}
FRE handles this just fine, it is PRE which does not.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26629
More information about the Gcc-bugs
mailing list