[fortran PATCH] Implement a(:,:) = 0.0 using memset (take 2)

Steve Kargl sgk@troutmask.apl.washington.edu
Tue Dec 19 05:54:00 GMT 2006


On Mon, Dec 18, 2006 at 06:55:22PM -0700, roger@eyesopen.com wrote:
> As pointed out by Steve Kargl, some of the tests in my recent patch were
> overly conservative, and only handled pointers to arrays, rather than
> local arrays.  The revised patch below addresses this limitation/oversight
> and allows us to use __builtin_memset in more cases.
> 

Hi Roger, 

I figure I might as well push my luck. :)

Your patch appears to omit

program v
  real, allocatable :: x(:)
  allocate(x(100))
  x = 0.
end program v

which is probably your 

  "[4] Extend infrastructure for arbitrary (run-time) length expressions,
   such as a(1:n) = 0.0."

This idiom appears in a few places in Polyhedron, and I know it
is strewn throughout my own Fortran code.

Perhaps, the patch that Andrew has mention can deal with this.


-- 
Steve



More information about the Gcc-patches mailing list