This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32817] MODULE functions are not inlined
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 May 2009 16:26:24 -0000
- Subject: [Bug fortran/32817] MODULE functions are not inlined
- References: <bug-32817-13648@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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