[Bug fortran/36928] New: array temporary for interleaving assignment

tkoenig at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Jul 25 06:55:00 GMT 2008


The temporary is not needed in this case.

$ cat foo.f90
program main
  real, dimension(10) :: a
  read (10) a
  a(2:10:2) = a (1:9:2)
end program main
$ gfortran -Warray-temporaries foo.f90
foo.f90:4.14:

  a(2:10:2) = a (1:9:2)
             1
Warning: Creating array temporary at (1)


-- 
           Summary: array temporary for interleaving assignment
           Product: gcc
           Version: 4.4.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


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36928



More information about the Gcc-bugs mailing list