This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/38112] New: unneeded temporary
- From: "jv244 at cam dot ac dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Nov 2008 08:47:28 -0000
- Subject: [Bug fortran/38112] New: unneeded temporary
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
since b is an allocatable without the target attribute, there is no way it can
'alias' a. No need for a temp thus
SUBROUTINE S(a)
INTEGER, POINTER, DIMENSION(:) :: a
INTEGER, DIMENSION(:), ALLOCATABLE :: b
ALLOCATE(b(10))
b(a)=1
END SUBROUTINE S
gfortran -c -Warray-temporaries test.f90
test.f90:5.2:
b(a)=1
1
Warning: Creating array temporary at (1)
--
Summary: unneeded temporary
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jv244 at cam dot ac dot uk
OtherBugsDependingO 36854
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38112