This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran] Fix NULL reference types.
- From: Paul Brook <paul at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Daniel Jacobowitz <drow at false dot org>,Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>, mark at codesourcery dot com
- Date: Thu, 19 Aug 2004 19:00:14 +0100
- Subject: Re: [gfortran] Fix NULL reference types.
- Organization: CodeSourcery
- References: <10408191754.AA27453@vlsi1.ultra.nyu.edu> <20040819175540.GA28975@nevyn.them.org>
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