------- Comment #2 from tkoenig at gcc dot gnu dot org  2008-07-28 09:52 -------
Another test case:

$ cat foo.f90
program main
  real, dimension(2,2) :: a
  real, dimension(2) :: b
  call random_number(a)
  b = sum(a,dim=1) + 0.4
end program main
$ gfortran -Warray-temporaries foo.f90
foo.f90:5.6:

  b = sum(a,dim=1) + 0.4
     1
Warning: Creating array temporary at (1)


-- 

tkoenig at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|unneeded temporary          |unneeded temporary for array
                   |                            |intrinsic binop scalar


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

Reply via email to