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 c++/14950] [3.4 Regression] [non unit-at-a-time] always_inline does not mix with templates and -O0


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


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