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: [tree-ssa] More aliasing fixes


In message <1071634563.30692.34.camel@frodo.toronto.redhat.com>, Diego Novillo 
writes:
 >
 >This one has been around for a while.  When selecting memory tags, we
 >were wrongly choosing the same memory tag for pointers that could not
 >possibly point to the same location.
 >
 >In this fragment of code, that Jeff sent me a while ago, we were
 >thinking that that references to pointer 'decl' could be aliased with
 >pointer 'cond'.  This prevented the elimination of the second if().
 >
 >simplify_condition (tree *cond_p)
 >{
 >  tree decl;
 >  tree cond = *cond_p;
 >  if (cond->common.code != 42)
 >    abort ();
 >  decl = cond->list.purpose;
 >  if (cond->common.code != 42)
 >    abort ();
 >  c_simplify_stmt (&decl);
 >}
 >
 >This same problem was the root of the must-alias promotion problem in
 >libstdc++.  The test that was failing (24_iterators/iterator.cc) had
 >sufficiently convoluted alias sets that at the time I didn't realize
 >that my fix was actually papering over the problem.  Oh, well.
 >
 >Bootstrapped and tested x86, ia64 and amd64.
[ ... ]
Thanks.

I see you checked in a new testcase.   Isn't it just a duplicate of
20030807-7.c?

jeff



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