This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: TREE_UNCHANGING?
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Jason Merrill <jason at redhat dot com>
- Cc: <gcc at gcc dot gnu dot org>, <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 11 May 2002 00:56:35 +0100 (BST)
- Subject: Re: TREE_UNCHANGING?
On Fri, 10 May 2002, Jason Merrill wrote:
> > int i;
> > void f ();
> > void g (int *__restrict p)
> > {
> > int j = *p;
> > f ();
> > j += *p;
> > i = j;
> > }
>
> Here's a preliminary patch to implement those semantics, and to give all
> vtable pointers a unique, restricted alias set. Comments?
Many alias analysis cases can (and so should) have testcases added to the
testsuite (for the code above, call a nonexistent function if j != *p just
after f (), and test that the call is optimised out so the program
successfully links). (Of course in such a case make sure that the
testcase is indeed testing the patch - that it fails before the patch, as
well as passing afterwards.) I don't however know whether the C++ case in
question is amenable to such testing.
--
Joseph S. Myers
jsm28@cam.ac.uk