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]
Other format: [Raw text]

Pointer arithmetic rules in the tree optimizers?


In trying to disentangle the notion of call-clobbering from aliasing,
I've run into a few oddities which I'm not sure how to deal with.

     1. In testsuite/gfortran.fortran-torture/execute/forall_5.f90 we
        are generating P = &VAR + R, where both P and R are of a pointer
        type.  Is that correct?  In this case we were missing the fact
        that 'P' points to 'VAR' because the alias analyzer was only
        picking on 'R' and ignoring the other operand (assuming that it
        should be an integer offset).
     2. In cp/parser.c we are generating 'P = X + Y', where 'P' is of
        pointer type, '+' is of pointer type.  But *both* 'X' and 'Y'
        are plain integers.

Before I go on trying to find where things are going wrong, I'd like to
confirm that these two cases are indeed a problem.  For now, I've told
the alias analyzer to never assume anything about pointer arithmetic and
always look at both operands.


Thanks.  Diego.


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