[PATCH, gfortran] Re: Cray Pointers

Paul Brook paul@codesourcery.com
Fri Aug 12 21:11:00 GMT 2005


> > % cat ex3.f90.t02.original
> > MAIN__ ()
> > {
> >    real4 t;
> >    int8 ipt;
> >
> >    {
> >      <unnamed type> D.805;
> >
> >      D.805 = (<unnamed type>) (int8) &t;
> >      ipt = (int8) D.805;
> >    }
> >    *(real4 *) ipt = 1.0e+0;
> > }
>
> can you use "void*" instead when you have a pointer?

That wouldn't help. Aliasing works based on the type that the value is 
accesses though, not the type of any intermediate variables used to store the 
pointer. The type-based-aliasing rules are exactly the same regardless of the 
type of ipt.

Paul



More information about the Fortran mailing list