This is the mail archive of the gcc@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]

Re: type based aliasing again


    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.


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