[gfortran] Fix NULL reference types.

Paul Brook paul@codesourcery.com
Thu Aug 19 18:02:00 GMT 2004


On Thursday 19 August 2004 18:55, Daniel Jacobowitz wrote:
> On Thu, Aug 19, 2004 at 01:54:53PM -0400, Richard Kenner wrote:
> >     I suppose that we could provide the same information I wanted to
> > convey with REFERENCE_TYPE to the optimizer in some other way: a bit on
> > VAR_DECLs, PARM_DECLs, FIELD_DECLs, etc. that says "never NULL".
> >
> > And INDIRECT_REF, which is somewhat of the harder one.  That's why I
> > think types are the best approach.
> >
> >     I do think that we should find some way to give this information to
> > the optimizers.
> >
> > The other issue is when we know that an indirect reference can't trap,
> > such as the CHAIN reference.
>
> I suspect we know that Fortran's reference types can't trap if they are
> non-NULL, also.  That might be nice to represent also.

In Fortran they can trap on write, but not on read.

Paul



More information about the Gcc-patches mailing list