This is the mail archive of the gcc-patches@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]

Re: [PATCH] Fix PR15791, 2nd try



On Jan 27, 2005, at 12:32 PM, Richard Guenther wrote:


But you are potentially right here - is there some more strict
test than TYPE_MAIN_VARIANT?

Just test type1 == type2 and then call fold_convert on one or the other.

Also try which is more likely to cause the C++ front-end to call fold:
int f(int i, unsigned j)
{
  int b[2];
  if (&b[i] == &b[j])
    return 1;
  return 0;
}


Yes, that's a good idea. But rather than looking for "good" optimization
I'm curious wether I might do something wrong, of course. After all,
this is my first fiddling with optimization of trees.

No you want the testcases for both looking if you did the optimization and if you did it correctly.

Some of the testcases which I sent are good examples of both, you just
need to add the dg stuff.



-- Pinski


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