Pointer arithmetic rules in the tree optimizers?
James E Wilson
wilson@specifixinc.com
Fri Aug 20 01:56:00 GMT 2004
Diego Novillo wrote:
> 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?
This looks wrong to me. I think the Fortran front end is just trying to
make the types match, without realizing that pointer arithmetic is
different. They probably don't see a lot of variables of pointer type
in the Fortran front end. Arrays yes, pointers no.
> 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.
Not enough info to go on, but it does look suspiciously wrong.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
More information about the Gcc
mailing list