TREE_UNCHANGING?
Joseph S. Myers
jsm28@cam.ac.uk
Fri May 10 18:01:00 GMT 2002
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
More information about the Gcc-patches
mailing list