This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36931] unneeded temporary for array intrinsic binop scalar
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jul 2008 09:52:13 -0000
- Subject: [Bug fortran/36931] unneeded temporary for array intrinsic binop scalar
- References: <bug-36931-6642@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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