------- Comment #5 from fxcoudert at gcc dot gnu dot org 2009-05-02 16:26
-------
Now, inlining of non-CONTAINED procedures works when -fwhole-file is used (it
will be the default when the remaining bugs are fixed).
However, functions from used modules are still not inlined; a reduced testcase
is:
module foomod
contains
integer function bar()
bar = 1
end function
end module
subroutine gee
use foomod
if (bar() == 0) call abort
end subroutine
In this, the call to bar() should be inlined, but it is not (compile with "-O2
-fdump-tree-optimized -fwhole-file" and check the .optimized tree dump). The
same code, with a non-module global function, has the call inlined:
integer function bar()
bar = 1
end function
subroutine gee
integer, external :: bar
if (bar() == 0) call abort
end subroutine
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu dot
| |org
Last reconfirmed|2007-07-24 16:03:03 |2009-05-02 16:26:23
date| |
Summary|inline (pure) accessor |MODULE functions are not
|functions |inlined
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32817