From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Stallman To: jbuck@synopsys.com Cc: mark@codesourcery.com, jbuck@synopsys.com, gcc@gcc.gnu.org Subject: Re: type based aliasing again Date: Thu, 30 Sep 1999 18:02:00 -0000 Message-ID: <199909100634.CAA01839@psilocin.gnu.org> References: <199909090502.WAA24772@atrus.synopsys.com> X-SW-Source: 1999-09n/msg00394.html Message-ID: <19990930180200.joQ8hMYKsyzvP42nuYYNbGjzvCBqlQIiwnkXZoFgWHA@z> But this is just the reverse of what happens now; since -O2 will do more reordering than -O, we already have programs that work with -O and don't work with -O2 because of type-based aliasing. There may also be some that work now with -O2 and not with -O. I don't know any examples, but if there are two instructions that could be compiled in either order, it could be that -O chooses the order the user doesn't want, and -O2 for random reasons chooses the order the user does want. In general, for any set of options, there will be a fairly large number of cases of invalid aliasing that just happen to work, because the optimizers decide not to do the possible optimizations that could have changed the behavior.