This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/26629] tree load PRE does not work on array references



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]