This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14950] [3.4 Regression] [non unit-at-a-time] always_inline does not mix with templates and -O0
- From: "hubicka at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 May 2004 20:21:48 -0000
- Subject: [Bug c++/14950] [3.4 Regression] [non unit-at-a-time] always_inline does not mix with templates and -O0
- References: <20040414064852.14950.veksler@il.ibm.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From hubicka at gcc dot gnu dot org 2004-05-05 20:21 -------
The problem here is that we do only in order inlining with -fno-unit-at-a-time.
The C++ frontend is deffering the functions until they are really used so the
Foo is not passed to cgraph code before main is called and thus it can't be
inlined.
I am not sure how to cope with this problem. (except for fact explaining
people that using Linux headers definig alwaysinline by default is bad idea).
Reorganizing C++ frontend to sanely finalize all functions and rely on cgraph
code to output only needed one is quite drastical step for 3.4.x series (tought
I definitly can try do it if it sounds sane - it basically means to add flag to
cgraph code teaching non-unit-at-a-time to not be too active about compiling
functions that don't seem to be needed and kill the non-unit-at-a-time code in
the C++ frontend. If we get lucky, this might work.)
Perhaps we can make always_inline failures warnings in non-unit-at-a-time
mentioning that alwyas_inline works reliably only in unit-at-a-time?
Concerning the always_inline&Linux kernel isses, perhaps we can either teach
fixincludes to fix that or do sanity check in the configure erroring out and
asking user to use glibc includes istead?
Honza
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |mark at codesourcery dot com
AssignedTo|unassigned at gcc dot gnu |hubicka at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14950