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: [gfortran,patch] Inline remaining allocation/deallocation routines


On 8/28/07, François-Xavier Coudert <fxcoudert@gmail.com> wrote:
> > By the way, somehow the middle end fails to optimize away the "if(a.data
> > != NULL)" branch although the variable has been initialized to NULL
> > before. With my little C program it works (even w/o using the "restrict"
> > attribute). We should fill a middle end PR when this is checked in.

I guess that 'a' is a global?  (Do you have a fortran testcase that shows this?)

> Probably because we call a function with a pointer to a somewhere
> (I/O?) which cannot lead to modification according to Fortran rules,
> but we don't correctly give this information to the middle-end. There
> are several such missed-optimizations throughout the front-end, I
> think.

Zdenek posted a patch with infrastructure to support this more easily, but it
didn't get approved yet.

Richard.


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