-Warray-temporaries indicates a temporary here:

MODULE M1
CONTAINS
  SUBROUTINE S1()
     REAL :: a(3),b(3,3),c(3)
     a=MATMUL(b,c)/2
  END SUBROUTINE S1
END MODULE M1

but it could be avoided as in:

MODULE M1
CONTAINS
  SUBROUTINE S1()
     REAL :: a(3),b(3,3),c(3)
     a=MATMUL(b,c)
     a=a/2
  END SUBROUTINE S1
END MODULE M1


-- 
           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


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

Reply via email to