[Bug ipa/64801] [5 Regression] kernel build failure due to ICF

hubicka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 29 05:30:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64801

--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
OK, the testcase is buggy: fsp_detect should be static inline.  GCC is valid to
not inline it and not produce offline copy because that should be produced by
other unit.

What happens is that icf merge elantech_detect and fsp_detect:

Parsed function:fsp_detect                                                      
fsp_detect ()                                                                   
{                                                                               
  <bb 2>:                                                                       
  return -38;                                                                   

}                                                                               


Parsed function:elantech_detect                                                 
elantech_detect ()                                                              
{                                                                               
  <bb 2>:                                                                       
  return -38;                                                                   

}                                                                               

and turns elantech_detect into a thunk calling fsp_detect (not much of point in
doing that but all right).  Eventually we fail inline:

  not inlinable: elantech_detect/1 -> fsp_detect/2, mismatched arguments        
   Estimating body: fsp_detect/2                                                
   Known to be false: not inlined                                               
   size:0 time:0                                                                

So the question is why we consider the call as having mismatch?



More information about the Gcc-bugs mailing list