This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Re: [PATCH, gfortran] Re: Cray Pointers


> 
> At 9:15 PM +0200 8/12/05, Thomas Koenig wrote:
> >Asher Langton wrote:
> >
> >>  The trouble occurs when a
> >>  pointee and an object that it aliases are both used in the same part
> >>  of the program.
> >
> >Would it make sense to declare a pointee as a target, i.e.
> >set TREE_ADDRESSABLE on it?
> 
> With our implementation (which we've designed with the goal of being 
> consistent with the existing implementations), I don't think that 
> would help.  All of the pointee translations are purely front-end. 
> Here's an example, with the GENERIC output.  Note that the pointee p 
> is not in the GENERIC tree:
> 
> % cat ex3.f90
> program ex3
>    real t
>    real p
>    pointer (ipt, p)
>    ipt = loc(t)
>    p = 1.0
> end program ex3
> 
> % 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?

-- Pinski


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