This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41137] inefficient zeroing of an array
- 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: 1 Nov 2009 16:21:22 -0000
- Subject: [Bug fortran/41137] inefficient zeroing of an array
- References: <bug-41137-6642@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from tkoenig at gcc dot gnu dot org 2009-11-01 16:21 -------
A workaround (which should really be implemented within the compiler):
subroutine s(a,n)
integer :: n
real :: a(n*n*n*n)
a = 0.0
end subroutine
This is legal Fortran, equivalent to your routine, and should be much faster.
Confirmed, BTW.
--
tkoenig at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-11-01 16:21:21
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41137