subroutine foo(a, b) real :: a(10), b(10) a(1:4:2) = a(2:4:2) b(1:3:2) = b(2:4:2) end subroutine foo i...@linux-fd1f:/tmp> gfortran -c -Warray-temporaries dep.f90 dep.f90:3.13:
a(1:4:2) = a(2:4:2) 1 Warnung: Creating array temporary at (1) The upper bound of '4' in the first array assingment is no different from '3'; the generation of the array temporary should be based on the number of iterations, not the upper bound. -- Summary: array temporary with high upper bound Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tkoenig at gcc dot gnu dot org OtherBugsDependingO 36854 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44235