public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/38112]  New: unneeded temporary
@ 2008-11-14  8:48 jv244 at cam dot ac dot uk
  2008-11-14  8:52 ` [Bug fortran/38112] " jv244 at cam dot ac dot uk
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: jv244 at cam dot ac dot uk @ 2008-11-14  8:48 UTC (permalink / raw)
  To: gcc-bugs

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


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

end of thread, other threads:[~2010-05-25 20:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-14  8:48 [Bug fortran/38112] New: unneeded temporary jv244 at cam dot ac dot uk
2008-11-14  8:52 ` [Bug fortran/38112] " jv244 at cam dot ac dot uk
2008-11-18 20:02 ` pault at gcc dot gnu dot org
2010-02-22  5:49 ` pault at gcc dot gnu dot org
2010-02-22  8:58 ` burnus at gcc dot gnu dot org
2010-02-22  9:06 ` paul dot richard dot thomas at gmail dot com
2010-02-23  8:45 ` burnus at gcc dot gnu dot org
2010-02-24  6:46 ` pault at gcc dot gnu dot org
2010-05-09 20:51 ` dfranke at gcc dot gnu dot org
2010-05-25 20:52 ` mikael at gcc dot gnu dot org
2010-05-25 20:57 ` paul dot richard dot thomas at gmail dot com

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