This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33341] array temporaries for array constructors (unnecessary stores)
- From: "dfranke at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Jan 2009 21:39:28 -0000
- Subject: [Bug fortran/33341] array temporaries for array constructors (unnecessary stores)
- References: <bug-33341-10391@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from dfranke at gcc dot gnu dot org 2009-01-03 21:39 -------
Not specific to the ALL intrinsic.
$> cat ctor.f90
INTEGER :: i, n, a(5)
n = 5
a = (/ (i, i = 1, n) /)
END
$> gfortran-svn -Warray-temporaries ctor.f90
ctor.f90:3.9:
a = (/ (i, i = 1, n) /)
1
Warning: Creating array temporary at (1)
If N is not a variable, the simplifier takes over and no runtime construction
of arrays is necessary. Not applicable example in #0, of course.
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dfranke at gcc dot gnu dot
| |org
Summary|array temporaries for "all |array temporaries for array
|intrinsic" (unnecessary |constructors (unnecessary
|stores for array |stores)
|constructor) |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33341