This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] More aliasing fixes
- From: law at redhat dot com
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 16 Dec 2003 21:21:32 -0700
- Subject: Re: [tree-ssa] More aliasing fixes
- Reply-to: law at redhat dot com
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