public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52243] New: Avoid reallocation for:  array1 = array1 / scalar  for performance
@ 2012-02-14  9:53 burnus at gcc dot gnu.org
  2013-08-28 21:06 ` [Bug fortran/52243] " tkoenig at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-02-14  9:53 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52243
           Summary: Avoid reallocation for:  array1 = array1 / scalar  for
                    performance
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
                CC: pault@gcc.gnu.org


Some testing with -Wrealloc-lhs (PR 52196) showed that it is rather common to
encounter the following code.

gfortran inserts a reallocation check - but as the same array is on the LHS and
on the RHS, the LHS must be allocated with the correct shape is the same.
Hence, no reallocation check should be inserted (missed optimization):

        nablamat=nablamat*hescale
         kpoints=kpoints/scale                                
      hreal=hreal/cmplx(real(nkpts),0.0)

    y2 = y2 + y

      ylm = conjg( ylm )
      phasusbmat=conjg(phasusbmat)

      cc = det * transpose(cc)


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-08-29 11:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-14  9:53 [Bug fortran/52243] New: Avoid reallocation for: array1 = array1 / scalar for performance burnus at gcc dot gnu.org
2013-08-28 21:06 ` [Bug fortran/52243] " tkoenig at gcc dot gnu.org
2013-08-29 11:44 ` tkoenig at gcc dot gnu.org
2013-08-29 11:45 ` tkoenig at gcc dot gnu.org
2013-08-29 11:46 ` tkoenig at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).