public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/23169] New: INTENT information not used in the middle-end for optimizations
@ 2005-08-01  4:47 steven at gcc dot gnu dot org
  2005-08-01 12:08 ` [Bug fortran/23169] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 14+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-08-01  4:47 UTC (permalink / raw)
  To: gcc-bugs

In the function bar, the INTENT(IN) markers mean that p and q may not be  
modified by bar.  This means that the constants 3 and 12 can be progagated 
in the function foo.  My guess is that there should be some way for alias 
analysis to be taught about this, so I've added the experts to the CC: list. 
 
       integer function foo(a,b,c) 
          integer, intent(out) :: a 
          integer, intent(in) :: b, c 
          integer p, q 
 
          p = 3 
          q = 12 
 
          a = bar(b,c,p,q) 
 
          foo = p*q 
       end function 
 
       integer function bar(b,c,p,q) 
          integer, intent(in) :: b, c, p, q 
          bar = p*b + q*c 
       end function

-- 
           Summary: INTENT information not used in the middle-end for
                    optimizations
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: missed-optimization, alias
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: steven at gcc dot gnu dot org
                CC: dberlin at gcc dot gnu dot org,dnovillo at redhat dot
                    com,gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2010-07-13 13:32 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-23169-280@http.gcc.gnu.org/bugzilla/>
2005-10-02 21:27 ` [Bug fortran/23169] INTENT information not used in the middle-end for optimizations pinskia at gcc dot gnu dot org
2005-10-03  6:14 ` steven at gcc dot gnu dot org
2005-10-09 17:41 ` pinskia at gcc dot gnu dot org
2008-09-21 13:37 ` steven at gcc dot gnu dot org
2008-12-27  0:41 ` dfranke at gcc dot gnu dot org
2008-12-29 14:27 ` dfranke at gcc dot gnu dot org
2009-01-02 10:30 ` rguenth at gcc dot gnu dot org
2009-01-02 11:06 ` tkoenig at gcc dot gnu dot org
2009-01-03 19:47 ` dfranke at gcc dot gnu dot org
2009-04-14 15:21 ` dfranke at gcc dot gnu dot org
2009-05-03 13:33 ` [Bug middle-end/23169] Fortran " fxcoudert at gcc dot gnu dot org
2010-07-13 10:37 ` steven at gcc dot gnu dot org
2010-07-13 13:32 ` burnus at gcc dot gnu dot org
2005-08-01  4:47 [Bug fortran/23169] New: " steven at gcc dot gnu dot org
2005-08-01 12:08 ` [Bug fortran/23169] " pinskia at gcc dot gnu dot 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).