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