This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/23169] Fortran INTENT information not used in the middle-end for optimizations



------- Comment #12 from fxcoudert at gcc dot gnu dot org  2009-05-03 13:32 -------
(In reply to comment #11)
> The original testcase in #0 appears to be fixed if compiled with -fwhole-file.
> Andrew's comment #4 appears to be still an issue?!

Here's a full testcase showing the remaining issue:

integer function foo()
  interface
    integer function bar(b)
      integer, intent(in) :: b
    end function
  end interface

  integer :: b, d, k
  b = 12
  d = b
  k = bar(b)
  foo = d - b
end function


In this code, the return value of function foo should not be computed, because
it's guaranteed to be 0. The missed optimization is still present.

This is something that the middle-end should be taught to honour, so I'm
switching the component to middle-end.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org
          Component|fortran                     |middle-end
   Last reconfirmed|2006-01-08 05:22:43         |2009-05-03 13:32:52
               date|                            |
            Summary|INTENT information not used |Fortran INTENT information
                   |in the middle-end for       |not used in the middle-end
                   |optimizations               |for optimizations


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]