------- Comment #1 from burnus at gcc dot gnu dot org  2010-07-02 07:31 -------
> At revision 161670, gfortran creates unneeded temporaries (not created up
> to r161462).
(r161462 = PR 44582)

channel.f90 has:

program sw
  double precision,dimension(M,N)::               f,dudx,dvdy,dhdx,dhdy
  dudx = ddx(u(:,:,mid))
contains
  function ddx(array)

And the problem is: How should the compiler know that "ddx" does not use the
(host associated) "dudx"?  Note: The function "ddx" is not declared as PURE -
and also cannot simply marked as pure as it host-associates the variables "I"
and "J" - thus a simple check for no host association would not work.

Hence, I fail to see how the compiler can handle it. Unless you find an example
where the compiler could know it, I fear one has to close the PR as WONTFIX.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44773

Reply via email to